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

Bug #16122 PEAR RunTest failed to run as expected
Submitted: 2009-04-19 08:43 UTC Modified: 2009-04-25 21:13 UTC
From: farell Assigned: dufuz
Status: Closed Package: PEAR (version 1.8.1)
PHP Version: 5.2.9 OS: Windows XP SP3
Roadmaps: 1.9.0    
Subscription  


 [2009-04-19 08:43 UTC] farell (Laurent Laville)
Description: ------------ As my test platform is Windows, the PHP version is 5.2.9-2 When I tried to re-run my suite tests for PHP_CompatInfo (stable 1.9.0), I got no results. 1. Direct call with pear run-tests <file> <file> = C:\wamp\bin\php\php5.2.9-2\tests\PHP_CompatInfo\tests\AllTests.php Running 0 tests TOTAL TIME: 00:00 0 PASSED TESTS 0 SKIPPED TESTS 2. Call from installed file, with pear run-tests -p php_compatinfo Running 0 tests TOTAL TIME: 00:00 0 PASSED TESTS 0 SKIPPED TESTS 3. And crash with phpunit 3.3.16 and pear run-tests -pu php_compatinfo Running 1 tests Fatal error: Cannot break/continue 1 level in C:\wamp\bin\php\php5.2.9-2\PEAR\PEAR\RunTest.php on line 248

Comments

 [2009-04-20 14:34 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified -Assigned To: +Assigned To: dufuz
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/RunTest.php?view=markup#l248 244 function runPHPUnit($file, $ini_settings = '') 245 { 246 if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) { 247 $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file); 248 break; 249 } elseif (file_exists($file)) { 250 $file = realpath($file); 251 }
 [2009-04-20 19:14 UTC] farell (Laurent Laville)
More details I've forgotten to add in initial report, that could help ! [20-Apr-2009 20:12:56] PHP Fatal error: Cannot break/continue 1 level in C:\wamp\bin\php\php5.2.9-2\PEAR\PEAR\RunTest.php on line 248 [20-Apr-2009 20:12:56] PHP Stack trace: [20-Apr-2009 20:12:56] PHP 1. {main}() C:\wamp\bin\php\php5.2.9-2\PEAR\pearcmd.php:0 [20-Apr-2009 20:12:56] PHP 2. PEAR_Command_Common->run($command = 'run-tests', $options = array ('package' => TRUE, 'phpunit' => TRUE), $params = array (0 => 'php_compatinfo')) C:\wamp\bin\php\php5.2.9-2\PEAR\pearcmd.php:308 [20-Apr-2009 20:12:56] PHP 3. PEAR_Command_Test->doRunTests($command = 'run-tests', $options = array ('package' => TRUE, 'phpunit' => TRUE), $params = array (0 => 'php_compatinfo')) C:\wamp\bin\php\php5.2.9-2\PEAR\PEAR\Command\Common.php:271 [20-Apr-2009 20:12:56] PHP 4. PEAR_RunTest->runPHPUnit($file = FALSE, $ini_settings = '') C:\wamp\bin\php\php5.2.9-2\PEAR\PEAR\Command\Test.php:258
 [2009-04-25 21:13 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Verified +Status: Closed
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. While I could not reproduce this on my system, due to the file paths, then I simply fixed the if so it does not call break as it makes no sense.