parent::setUp();
+ $this->setContentLang( $wgContLang );
+
$this->setMwGlobals( [
'wgExtraNamespaces' => $wgExtraNamespaces,
'wgNamespaceContentModels' => $wgNamespaceContentModels,
'wgContentHandlers' => $wgContentHandlers,
- 'wgContLang' => $wgContLang,
] );
$wgExtraNamespaces[12312] = 'Dummy';
$wgNamespaceContentModels[12312] = "testing";
$wgContentHandlers["testing"] = 'DummyContentHandlerForTesting';
- MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
+ MWNamespace::clearCaches();
+ $wgContLang->resetNamespaces(); # reset namespace cache
+ }
+
+ protected function tearDown() {
+ global $wgContLang;
+
+ MWNamespace::clearCaches();
$wgContLang->resetNamespaces(); # reset namespace cache
+ parent::tearDown();
}
/**
$ep->importFormData( $req );
$this->setExpectedException(
- 'MWException',
+ MWException::class,
'This content model is not supported: testing'
);