Automatically reset namespace caches when needed
authorAryeh Gregor <ayg@aryeh.name>
Wed, 1 Aug 2018 12:40:47 +0000 (15:40 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Wed, 1 Aug 2018 13:30:08 +0000 (16:30 +0300)
commit63d7f2ad1345453dc16f16493fc7e5524219cfb8
tree404f068bac926d241db2b137b1babc085c47cc7f
parentf17feae3a991de9f54e0f57d91fe95bf84211fcb
Automatically reset namespace caches when needed

This avoids error-prone code written separately in every test.  In
addition to no existing tests resetting the TitleFormatter (more
services probably need to be reset as well), they mostly reset only the
namespace cache on $wgContLang, which wouldn't help for any other
language.

The parser test runner still doesn't do this, but maybe it should.

Change-Id: I44b7a1aec48f14b0950907fa14bd0df80f674296
12 files changed:
languages/Language.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/PagePropsTest.php
tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/languages/LanguageTest.php