X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fconfig%2FConfigFactoryTest.php;h=ba38128f1728ccc7d5429278f05f6e48f96bc3e1;hp=f42cb95921983713475ff1889a621e690f141cc8;hb=5049af1048c77b1ea6ab3193688d23a48ddf8df0;hpb=9e23ffa3951dd4222ae780bb512a6874c5fe4a83 diff --git a/tests/phpunit/includes/config/ConfigFactoryTest.php b/tests/phpunit/includes/config/ConfigFactoryTest.php index f42cb95921..ba38128f17 100644 --- a/tests/phpunit/includes/config/ConfigFactoryTest.php +++ b/tests/phpunit/includes/config/ConfigFactoryTest.php @@ -1,5 +1,7 @@ register( 'foo', 'GlobalVarConfig::newInstance' ); - $newFactory->register( 'bar', function() { + $newFactory->register( 'bar', function () { return new HashConfig(); } ); @@ -140,7 +142,7 @@ class ConfigFactoryTest extends MediaWikiTestCase { public function testGetDefaultInstance() { // NOTE: the global config factory returned here has been overwritten // for operation in test mode. It may not reflect LocalSettings. - $factory = ConfigFactory::getDefaultInstance(); + $factory = MediaWikiServices::getInstance()->getConfigFactory(); $this->assertInstanceOf( 'Config', $factory->makeConfig( 'main' ) ); }