Home » Testing » PHPUnit2 » Bug #2185
Method suite does not exist (phpunit2/php 5.0.1)
Details
| Submitted | 2004-08-21 17:55 UTC |
|---|---|
| From | gabrie16 at msu dot edu |
| Status | Closed |
| Package | PHPUnit2 |
| PHP Version | 5.0.0 |
| OS | Gentoo Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-08-21 17:55 UTC] gabrie16 at msu dot edu
Description:
------------
**This bug actually involves php 5.0.1. 5.0 worked fine!
Unit tests which worked in php5 will not run with 5.0.1. this is due to the reflectionClass->getMethod failing in ~129 in BaseTestRunner.php. The line is:
$suiteMethod = $testClass->getMethod(self::SUITE_METHODNAME);
the method throws an uncaught exception.
temporary solution below still brings up error message: "Method suite does not exist"
Reproduce code:
---------------
change
$suiteMethod = $testClass->getMethod(self::SUITE_METHODNAME);
to
try {
$suiteMethod = $testClass->getMethod(self::SUITE_METHODNAME);
} catch(Exception $e) {
echo ($e->getMessage() . "\n");
}