X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FEditPageTest.php;h=8f0826b5e6840773372ce70f56a7c02410dc2843;hb=78955203c3c1f810cae04c7c92790c99c1de9e7f;hp=ad0d07a4174c62ee4bdbba179a76514b5704245e;hpb=a9a17027aa93d50edfd771dbde4027d48ced5dd8;p=lhc%2Fweb%2Fwiklou.git 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' );