public function testExecutionWithIncompleteConfiguration()
 {
     $test = $this->default + array('wgExtraNamespaces' => '', 'wgNamespaceAliases' => '');
     $instance = new NamespaceManager($test, $this->extraneousLanguage);
     $instance->init();
     $this->assertNotEmpty($test);
 }
Пример #2
0
 /**
  * Setup and initialization
  *
  * @note $wgExtensionFunctions variable is an array that stores
  * functions to be called after most of MediaWiki initialization
  * has finalized
  *
  * @see https://www.mediawiki.org/wiki/Manual:$wgExtensionFunctions
  *
  * @since  1.9
  */
 public static function onExtensionFunction()
 {
     // 3.x reverse the order to ensure that smwgMainCacheType is used
     // as main and smwgCacheType being deprecated with 3.x
     $GLOBALS['smwgMainCacheType'] = $GLOBALS['smwgCacheType'];
     $applicationFactory = ApplicationFactory::getInstance();
     $namespace = new NamespaceManager($GLOBALS);
     $namespace->init();
     $setup = new Setup($applicationFactory, $GLOBALS, __DIR__);
     $setup->run();
 }