Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #12793 run-tests fails when using --ARGS-- in phpt test files
Submitted: 2007-12-29 13:49 UTC
From: izi Assigned: izi
Status: Closed Package: PEAR (version CVS)
PHP Version: 5.2.5 OS: OpenBSD
Roadmaps: 1.7.0    
Subscription  


 [2007-12-29 13:49 UTC] izi (David Jean Louis)
Description: ------------ When using --ARGS-- section in phpt files, the argv array is not correct, this is due to the fact that the php script runned by the run-tests command is not runned with the php "-f" option, this was removed recently, see: http://cvs.php.net/viewvc.cgi/pear-core/PEAR/RunTest.php?r1=1.40&r2=1.41 Let's take an example: Test script: --------------- --TEST-- Test for Console_CommandLine::parse() method (version). --ARGS-- --version --FILE-- <?php print_r($_SERVER['argv']); ?> --EXPECT-- Array ( [0] => /home/izi/pear/pear/Console_CommandLine/tmp.php [1] => --version ) Expected result: ---------------- The result of the script should be: Array ( [0] => /home/izi/pear/pear/Console_CommandLine/tmp.php [1] => --version ) Actual result: -------------- But I get: Array ( [0] => /home/izi/pear/pear/Console_CommandLine/tmp.php [1] => -- [2] => --version )

Comments

 [2008-01-18 22:55 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.