From: Tim Starling Date: Mon, 23 Jan 2012 19:06:09 +0000 (+0000) Subject: Make arguments to phpunit.php work. It's hard to believe this could have been broken... X-Git-Tag: 1.31.0-rc.0~25115 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=2462a1ae71f3bad798be0c73b7220a5625418890;p=lhc%2Fweb%2Fwiklou.git Make arguments to phpunit.php work. It's hard to believe this could have been broken since r79164, so maybe it was a change in the command line parser that PHPUnit uses that made it treat any options after the first non-option argument as being plain arguments rather than actual options. --- diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 39cccf8074..92eeffa257 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -46,8 +46,8 @@ require( RUN_MAINTENANCE_IF_MAIN ); if( !in_array( '--configuration', $_SERVER['argv'] ) ) { //Hack to eliminate the need to use the Makefile (which sucks ATM) - $_SERVER['argv'][] = '--configuration'; - $_SERVER['argv'][] = $IP . '/tests/phpunit/suite.xml'; + array_splice( $_SERVER['argv'], 1, 0, + array( '--configuration', $IP . '/tests/phpunit/suite.xml' ) ); } require_once( 'PHPUnit/Runner/Version.php' );