X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FEditPageTest.php;h=65c5d65a4b3a8e51e381c7e8ed8d1655289b4d96;hp=5a01dc006fb901c4a420c3b4e60672f7c1835c3e;hb=5fa4cdf860c79b32ab6ef034c6d9420c2727f695;hpb=1e3c2e5904d628c001a8d65909b135ea9bf042aa diff --git a/tests/phpunit/includes/EditPageTest.php b/tests/phpunit/includes/EditPageTest.php index 5a01dc006f..65c5d65a4b 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 @@ -53,7 +61,7 @@ class EditPageTest extends MediaWikiLangTestCase { false ], [ - "An initial section with a fake heder (bug 32617)\n\n== Test == ??\nwtf", + "An initial section with a fake heder (T34617)\n\n== Test == ??\nwtf", false ], [ @@ -61,7 +69,7 @@ class EditPageTest extends MediaWikiLangTestCase { "Section" ], [ - "== Section== \t\r\n followed by whitespace (bug 35051)", + "== Section== \t\r\n followed by whitespace (T37051)", 'Section', ], ]; @@ -165,6 +173,10 @@ class EditPageTest extends MediaWikiLangTestCase { $edit['wpStarttime'] = wfTimestampNow(); } + if ( !isset( $edit['wpUnicodeCheck'] ) ) { + $edit['wpUnicodeCheck'] = EditPage::UNICODE_CHECK; + } + $req = new FauxRequest( $edit, true ); // session ?? $article = new Article( $title ); @@ -697,7 +709,8 @@ hello 'wpTextbox1' => serialize( 'non-text content' ), 'wpEditToken' => $user->getEditToken(), 'wpEdittime' => '', - 'wpStarttime' => wfTimestampNow() + 'wpStarttime' => wfTimestampNow(), + 'wpUnicodeCheck' => EditPage::UNICODE_CHECK, ]; $req = new FauxRequest( $edit, true );