Home » Testing » PHPUnit2 » Bug #3723
Loader does not find PEAR-ified class names
Details
| Submitted | 2005-03-06 16:41 UTC |
|---|---|
| From | info at e-novative dot de |
| Status | Closed |
| Package | PHPUnit2 |
| PHP Version | 5.0.2 |
| OS | Win XP |
| Roadmaps | (Not assigned) |
Comments
[2005-03-06 16:41 UTC] info at e-novative dot de
Description:
------------
PHPUnit does not seem to find classes with PEAR-ified names (at http://pear.php.net/bugs/bug.php?id=3562 Sebastian said it should). In my working directory, and I have a class named "eno_Util_FileSetTest" stored in "eno/Util/FileSetTest.php".
Seems like in TestRunner in line 153 the class file name is defined and (finally) passed to StandardTestSuiteLoader::load. Since suiteClassFile always has a value, the decision "$suiteClassFile = !empty($suiteClassFile)" [line 42] never seems to reach the "str_replace('_', '/', $suiteClassName) . '.php'" branch. If I set suiteClassName to an empty string before this line, the test class is loaded as expected.
Reproduce code:
---------------
phpunit eno_Util_FileSetTest
Expected result:
----------------
(test results)
Actual result:
--------------
PHPUnit 2.2.0beta6 by Sebastian Bergmann.
Class eno_Util_FileSetTest could not be found in eno_Util_FileSetTest.php.