jenkins-bot has submitted this change and it was merged.
Change subject: test: inject autoloader in Maintenance class
......................................................................
test: inject autoloader in Maintenance class
We used to inject the test autoloader from the global space after the
Maintenance class has been initialized. That prevents us from using
tests classes (such as Mock) during the Maintenance setup.
This patch move the TestsAutoLoader.php require() at the beginning of
finalSetup() which would let use Mock classes.
Change-Id: Ia402eafae8407d1516e3d200ac97539e3681fdc6
---
M tests/phpunit/phpunit.php
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
IAlex: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index 7a22bd4..deef745 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -33,6 +33,9 @@
global $wgLocaltimezone, $wgLocalisationCacheConf;
global $wgDevelopmentWarnings;
+ // Inject test autoloader
+ require_once __DIR__ . '/../TestsAutoLoader.php';
+
// wfWarn should cause tests to fail
$wgDevelopmentWarnings = true;
@@ -108,6 +111,4 @@
die( 'PHPUnit 3.6.7 or later required, you have ' .
PHPUnit_Runner_Version::id() . ".\n" );
}
require_once 'PHPUnit/Autoload.php';
-
-require_once "$IP/tests/TestsAutoLoader.php";
MediaWikiPHPUnitCommand::main();
--
To view, visit https://gerrit.wikimedia.org/r/64568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia402eafae8407d1516e3d200ac97539e3681fdc6
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Platonides <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits