aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
blob: 3e1503074d03118431be18d78241d654610b63bb (plain) (blame)
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
<?php

use Wikimedia\TestingAccessWrapper;

/**
 * Just to test one deprecated method and one line of ServiceWiring code.
 */
class TempFSFileIntegrationTest extends MediaWikiIntegrationTestCase {
	use TempFSFileTestTrait;

	/**
	 * @coversNothing
	 */
	public function testServiceWiring() {
		$this->setMwGlobals( 'wgTmpDirectory', '/hopefully invalid' );
		$factory = $this->getServiceContainer()->getTempFSFileFactory();
		$this->assertSame( '/hopefully invalid',
			( TestingAccessWrapper::newFromObject( $factory ) )->tmpDirectory );
	}

	// For TempFSFileTestTrait
	private function newFile() {
		return TempFSFile::factory( 'tmp' );
	}
}