Home » Testing » PHPUnit2 » Bug #4612
underline to slash in the file name
Details
| Submitted | 2005-06-16 18:09 UTC |
|---|---|
| From | klose at cds-spremberg dot de |
| Status | Bogus |
| Package | PHPUnit2 |
| PHP Version | 5.0.4 |
| OS | Suse linux 9.2 |
| Roadmaps | (Not assigned) |
Comments
[2005-06-16 18:09 UTC] klose at cds-spremberg dot de
Description:
------------
hallo sebastian,
ich möchte gerne meine klassen testen aber deine test suite läuft nur wenn ich von meine dateinamenskonventionen abweiche.
teste ich mit testklassen ohne unterstrich im namen läuft alles.
I think there is a bug, if the test file contains underlines in the name. The same test with names like cModulTest runs correct.
Reproduce code:
---------------
require_once "PHPUnit2/Framework/TestCase.php";
//require_once "c_ordersystem.php";
class c_ordersystem_test extends PHPUnit2_Framework_TestCase {
public function testSimpleAdd() {
self::assertTrue(true);
}
}
Expected result:
----------------
PHPUnit 2.2.1 by Sebastian Bergmann.
.
Time: 0.00059700012207031
OK (1 test)
Actual result:
--------------
PHPUnit 2.2.1 by Sebastian Bergmann
Class c_ordersystem_test could not be found in c/ordersystem/test.php
[2005-06-17 15:07 UTC] klose at cds-spremberg dot de
thanks, but the tip:
You can either use
$ phpunit c_ordersystem_test c_ordersystem_test.php
don't solve the problem. I've changed the name restriction
for the testfiles and classes (pear like).
But please, inform the user in the top of the
documentation. I don't have found an info and lost many
time. ;-)