Daniel Werner has submitted this change and it was merged.

Change subject: Allow passing arguments to the PHPUnit runner
......................................................................


Allow passing arguments to the PHPUnit runner

Change-Id: Ib41ae8430327763087e07f1cb7202397105b7bc1
---
M Tests/Phpunit/phpunit.php
1 file changed, 11 insertions(+), 5 deletions(-)

Approvals:
  Daniel Werner: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Tests/Phpunit/phpunit.php b/Tests/Phpunit/phpunit.php
index 2a33ab3..66163d4 100755
--- a/Tests/Phpunit/phpunit.php
+++ b/Tests/Phpunit/phpunit.php
@@ -27,9 +27,15 @@
 
 echo 'Running tests for Ask version ' . Ask_VERSION . ".\n";
 
+$arguments = $_SERVER['argv'];
+array_shift( $arguments );
+
+if ( array_search( '--group', $arguments ) === false ) {
+       $arguments[] = '--group';
+       $arguments[] = 'Ask';
+}
+
+$arguments[] = __DIR__;
+
 $runner = new PHPUnit_TextUI_Command();
-$runner->run( array(
-       '--group',
-       'Ask',
-       __DIR__
-) );
+$runner->run( $arguments );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41ae8430327763087e07f1cb7202397105b7bc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to