aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
diff options
context:
space:
mode:
authorAryeh Gregor <ayg@aryeh.name>2019-08-16 13:00:15 +0300
committerAryeh Gregor <ayg@aryeh.name>2019-08-21 16:26:05 +0300
commita83b33582ae87efff13e68b67585ee0e1aeed036 (patch)
treeb1dff111609f2bf1db45ef6f63b741bab307e0ca /tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
parent434c154e67b1b2962f90fa1970645135f825632e (diff)
downloadmediawikicore-a83b33582ae87efff13e68b67585ee0e1aeed036.tar.gz
mediawikicore-a83b33582ae87efff13e68b67585ee0e1aeed036.zip
TempFSFileFactory service
This replaces TempFSFile::factory(), which is now deprecated. Change-Id: I9e65c3867e26c16687560dccc7d9f3e195a8bdd6
Diffstat (limited to 'tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php')
-rw-r--r--tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php b/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
index 42805b2db2d2..325babca4d13 100644
--- a/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
+++ b/tests/phpunit/includes/libs/filebackend/fsfile/TempFSFileIntegrationTest.php
@@ -1,6 +1,22 @@
<?php
+use MediaWiki\MediaWikiServices;
+use Wikimedia\TestingAccessWrapper;
+
+/**
+ * Just to test one deprecated method and one line of ServiceWiring code.
+ */
class TempFSFileIntegrationTest extends MediaWikiIntegrationTestCase {
+ /**
+ * @coversNothing
+ */
+ public function testServiceWiring() {
+ $this->setMwGlobals( 'wgTmpDirectory', '/hopefully invalid' );
+ $factory = MediaWikiServices::getInstance()->getTempFSFileFactory();
+ $this->assertSame( '/hopefully invalid',
+ ( TestingAccessWrapper::newFromObject( $factory ) )->tmpDirectory );
+ }
+
use TempFSFileTestTrait;
private function newFile() {