Improve namespace handling in tests
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 11 Sep 2017 20:37:18 +0000 (16:37 -0400)
committerLegoktm <legoktm@member.fsf.org>
Fri, 29 Sep 2017 05:21:47 +0000 (05:21 +0000)
commit2d9f29a84600af691e19eaedd01980dcc7b6a2b7
tree6e9387cd2090851a523d81f9c06309358e1360ce
parentca0f89b6249ce7e17807d4a85541b014da2fa0db
Improve namespace handling in tests

MWNamespace has three internal caches, only one of which can be cleared
(and that somewhat oddly by passing a boolean to
MWNamespace::getCanonicalNamespaces()).

This change introduces a MWNamespace::clearCaches() method to clear all
three caches. It also adds some resetting in tests that seemed to be
missing it.

Change-Id: I1dcfcd8713888b3ff8fc75e95329ba72bd95d0c9
includes/MWNamespace.php
tests/parser/ParserTestRunner.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/PagePropsTest.php
tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/RevisionStorageTest.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/XmlTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/content/ContentHandlerTest.php