PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Testing » PHPUnit2 » Bug #2185

Method suite does not exist (phpunit2/php 5.0.1)

Details

Submitted2004-08-21 17:55 UTC
Fromgabrie16 at msu dot edu
StatusClosed
PackagePHPUnit2
PHP Version5.0.0
OSGentoo 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");
}