Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/76711


Change subject: Fix parserTests.php for non-english test wikis
......................................................................

Fix parserTests.php for non-english test wikis

Running parserTests.php gives two failed test under a non-english wiki.

Both tests have corresponding article parts, which creates system
messages for the test.
While the messages gets added to the database, the language is not set
to en, so the created message gets under the wrong language into the
language cache.
When running the test, the language is set to en, but the message cannot
be found in the language cache. The message is not found.

Running test Bug 31098 Template which includes system messages which
includes the template... FAILED!
Running test Bug 32057: Title needed when expanding <h> nodes....
FAILED!

Change-Id: I18fb139e2227343018cdef737bda5aadb5c9fb35
---
M tests/parser/parserTest.inc
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/76711/1

diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 0469138..b501296 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -434,7 +434,12 @@
         */
        public function runTestsFromFiles( $filenames ) {
                $ok = false;
+
+               // be sure, ParserTest::addArticle has correct language set,
+               // so that system messages gets into the right language cache
+               $GLOBALS['wgLanguageCode'] = 'en';
                $GLOBALS['wgContLang'] = Language::factory( 'en' );
+
                $this->recorder->start();
                try {
                        $this->setupDatabase();

-- 
To view, visit https://gerrit.wikimedia.org/r/76711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18fb139e2227343018cdef737bda5aadb5c9fb35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to