Addshore has uploaded a new change for review.

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

Change subject: Remove includepath stuff from MediaWikiPHPUnitCommand
......................................................................

Remove includepath stuff from MediaWikiPHPUnitCommand

Change-Id: I949c1ca350a28c606fba7406e9904e836e596b49
---
M tests/phpunit/MediaWikiPHPUnitCommand.php
M tests/phpunit/phpunit.php
2 files changed, 14 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/131450/1

diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php 
b/tests/phpunit/MediaWikiPHPUnitCommand.php
index 7241f0a..bac9f4d 100644
--- a/tests/phpunit/MediaWikiPHPUnitCommand.php
+++ b/tests/phpunit/MediaWikiPHPUnitCommand.php
@@ -39,17 +39,6 @@
 
        public static function main( $exit = true ) {
                $command = new self;
-
-               # Makes MediaWiki PHPUnit directory includable so the PHPUnit 
will
-               # be able to resolve relative files inclusion such as suites/*
-               # PHPUnit uses stream_resolve_include_path() internally
-               # See bug 32022
-               set_include_path(
-                       __DIR__
-                               . PATH_SEPARATOR
-                               . get_include_path()
-               );
-
                $command->run( $_SERVER['argv'], $exit );
        }
 
diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index a0d23f5..c67bf38 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -107,6 +107,20 @@
                                array_splice( $_SERVER['argv'], 1, 0, 
'--colors' );
                        }
                }
+
+               # Makes MediaWiki PHPUnit directory includable so the PHPUnit 
will
+               # be able to resolve relative files inclusion such as suites/*
+               # PHPUnit uses stream_resolve_include_path() internally
+               # See bug 32022
+               $key = array_search( '--include-path', $_SERVER['argv'] );
+               if( $key === false ) {
+                       array_splice( $_SERVER['argv'], 1, 0,
+                               __DIR__
+                               . PATH_SEPARATOR
+                               . get_include_path()
+                       );
+                       array_splice( $_SERVER['argv'], 1, 0, '--include-path' 
);
+               }
        }
 
        public function getDbType() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I949c1ca350a28c606fba7406e9904e836e596b49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to