Merge "Fix \n handling for HTMLUsersMultiselectField"
[lhc/web/wiklou.git] / tests / phpunit / includes / config / ConfigFactoryTest.php
index f42cb95..ba38128 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 class ConfigFactoryTest extends MediaWikiTestCase {
 
        /**
@@ -61,7 +63,7 @@ class ConfigFactoryTest extends MediaWikiTestCase {
                // define new config instance
                $newFactory = new ConfigFactory();
                $newFactory->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' ) );
        }