Run SpecialPageFatalTest with lang=qqx
authorAmir Sarabadani <Ladsgroup@gmail.com>
Mon, 8 Jul 2019 12:52:06 +0000 (14:52 +0200)
committerAmir Sarabadani <Ladsgroup@gmail.com>
Mon, 8 Jul 2019 12:52:06 +0000 (14:52 +0200)
SpecialPageFatalTest:testSpecialPageDoesNotFatal is one of the slowest
tests (specially running Special:Version) due to the fact that it needs
to translate so many message keys.

3206ms to run SpecialPageFatalTest:testSpecialPageDoesNotFatal with data set "Version"

Running with lang=qqx would ensure that the special doesn't fatal but also avoid
unnecessary message translations

Change-Id: I8ff715ac539e93915c98f7209523df1b3ea3a7e8

tests/phpunit/structure/SpecialPageFatalTest.php

index 3fa31fe..1366119 100644 (file)
@@ -30,7 +30,7 @@ class SpecialPageFatalTest extends MediaWikiTestCase {
                $user = User::newFromName( 'UTSysop' );
 
                try {
-                       $executor->executeSpecialPage( $page, '', null, null, $user );
+                       $executor->executeSpecialPage( $page, '', null, 'qqx', $user );
                } catch ( \PHPUnit\Framework\Error\Deprecated $deprecated ) {
                        // Allow deprecation,
                        // this test want to check fatals or other things breaking the extension