From: Brad Jorsch Date: Thu, 20 Dec 2012 19:55:40 +0000 (-0500) Subject: (bug 43307) L10n recache needed in LogFormatterTest::tearDown X-Git-Tag: 1.31.0-rc.0~21239 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=3b1ce4902342f7b1f50dc44a487884f495159bbc;p=lhc%2Fweb%2Fwiklou.git (bug 43307) L10n recache needed in LogFormatterTest::tearDown 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 --- diff --git a/tests/phpunit/includes/logging/LogFormatterTest.php b/tests/phpunit/includes/logging/LogFormatterTest.php index d6cbbee26d..2fa2cc030a 100755 --- a/tests/phpunit/includes/logging/LogFormatterTest.php +++ b/tests/phpunit/includes/logging/LogFormatterTest.php @@ -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 );