summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/Utils/TempFileTest.php
blob: b29fa1bfa2bfb0862c4d6145c3af1dfec584d408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace SMW\Tests\Utils;

use SMW\Utils\TempFile;

/**
 * @covers \SMW\Utils\TempFile
 * @group semantic-mediawiki
 *
 * @license GNU GPL v2+
 * @since 3.0
 *
 * @author mwjames
 */
class TempFileTest extends \PHPUnit_Framework_TestCase {

	public function testGenerate() {

		$instance = new TempFile();

		$this->assertContains(
			'6na5ojj24og0',
			$instance->generate( 'Foo' )
		);

		$this->assertContains(
			'Bar7vmi67tsvkb0',
			$instance->generate( 'Bar', 'Foo' )
		);
	}

}