Remove LocalisationCache::unloadAll() call from NewParserTest::addDBData()
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 30 Apr 2013 18:51:26 +0000 (20:51 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 30 Apr 2013 23:58:21 +0000 (23:58 +0000)
- Localisation cache does not depend on the database, only on the
  localisation files themselves
- the backend is already set to LCStore_Null, so it will not interfere
  with other caches (CDB, database, etc.)

Unloading the whole cache before each test thus only adds overhead
without any benefit, and slows down the test suite (this changes allows
to win about 20 seconds on my local machine).

Change-Id: Ifa36a7135d9f8355e1a10dd49ece806d90f657a2

tests/phpunit/includes/parser/NewParserTest.php

index 994bc1c..3449cc7 100644 (file)
@@ -190,9 +190,6 @@ class NewParserTest extends MediaWikiTestCase {
                        __METHOD__
                );
 
-               # Reinitialise the LocalisationCache to match the database state
-               Language::getLocalisationCache()->unloadAll();
-
                # Clear the message cache
                MessageCache::singleton()->clear();