X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FEditPageTest.php;h=8f0826b5e6840773372ce70f56a7c02410dc2843;hp=ad0d07a4174c62ee4bdbba179a76514b5704245e;hb=0898ab0a5d99c0d92c83d26d8b8b090f76e023de;hpb=19b739bd19c437c5a637d85f431f139da7521508 diff --git a/tests/phpunit/includes/EditPageTest.php b/tests/phpunit/includes/EditPageTest.php index ad0d07a417..8f0826b5e6 100644 --- a/tests/phpunit/includes/EditPageTest.php +++ b/tests/phpunit/includes/EditPageTest.php @@ -29,10 +29,18 @@ class EditPageTest extends MediaWikiLangTestCase { $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(); + } + /** * @dataProvider provideExtractSectionTitle * @covers EditPage::extractSectionTitle @@ -709,7 +717,7 @@ hello $ep->importFormData( $req ); $this->setExpectedException( - 'MWException', + MWException::class, 'This content model is not supported: testing' );