(bug 43307) L10n recache needed in LogFormatterTest::tearDown
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 20 Dec 2012 19:55:40 +0000 (14:55 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 20 Dec 2012 19:55:40 +0000 (14:55 -0500)
LogFormatterTest replaces all extension localization files in
$wgExtensionMessagesFiles with its own, and correctly restores this
variable. But it neglects to refresh the localization cache after
restoring the variable, so subsequent extension tests are missing their
localization.

Change-Id: I74809af47830a5e09c36f8fec20c9c65b1e3aa17

tests/phpunit/includes/logging/LogFormatterTest.php

index d6cbbee..2fa2cc0 100755 (executable)
@@ -43,6 +43,13 @@ class LogFormatterTest extends MediaWikiLangTestCase {
                $this->context->setLanguage( $wgLang );
        }
 
+       protected function tearDown() {
+               parent::tearDown();
+
+               global $wgLang;
+               $wgLang->getLocalisationCache()->recache( $wgLang->getCode() );
+       }
+
        public function newLogEntry( $action, $params ) {
                $logEntry = new ManualLogEntry( 'phpunit', $action );
                $logEntry->setPerformer( $this->user );