Make SpecialBlankPageTest independend from the language
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Thu, 12 Sep 2019 11:10:52 +0000 (13:10 +0200)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Thu, 12 Sep 2019 11:10:52 +0000 (13:10 +0200)
I would like to argue this is best practice. This also currently blocks
https://gerrit.wikimedia.org/r/521480

Change-Id: I8477f8280038c383c35bebf559ba2b5841748821

tests/phpunit/includes/specials/SpecialBlankPageTest.php

index 879acfe..5435afa 100644 (file)
@@ -8,6 +8,11 @@
  */
 class SpecialBlankPageTest extends SpecialPageTestBase {
 
+       protected function setUp() {
+               parent::setUp();
+               $this->setUserLang( 'qqx' );
+       }
+
        /**
         * Returns a new instance of the special page under test.
         *
@@ -19,7 +24,7 @@ class SpecialBlankPageTest extends SpecialPageTestBase {
 
        public function testHasWikiMsg() {
                list( $html, ) = $this->executeSpecialPage();
-               $this->assertContains( wfMessage( 'intentionallyblankpage' )->text(), $html );
+               $this->assertContains( '(intentionallyblankpage)', $html );
        }
 
 }