Home » Testing » PHPUnit2 » Bug #4004
Exception messages are not shown
Details
| Submitted | 2005-03-30 14:44 UTC |
|---|---|
| From | sjoerd dot van dot der dot laag at philips dot com |
| Status | No Feedback |
| Package | PHPUnit2 |
| PHP Version | 5.0.3 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2005-03-30 14:44 UTC] sjoerd dot van dot der dot laag at philips dot com
Description:
------------
I downloaded PHPUnit2 version 2.2.0. With a bit of puzzling I got it to work. But I cannot get the skeleton to work from the command line. If I do it in a web page it works fine.
This works:
$Skeleton = new PHPUnit2_Util_Skeleton("Environment");
$Skeleton->write();
This does not:
pear-phpunit --skeleton Environment
I traced it back to this call ion the constructor of Skeleton:
if (file_exists($classSourceFile))
Why the skeleton doesn't I do not know. But the exception that is thrown is not caught or the error message is not shown.
Reproduce code:
---------------
Take an arbitrary php class name (like Environment) and invoke the MS-DOS batch file like this:
pear-phpunit --skeleton Environment
Make sure the file Environnment.php cannot be found, so the exception will be thrown.
Expected result:
----------------
I expect to see that the exception is caught by the exception handler and the error message is shown. I already added the line below to the exception handler in TestRunner.php, but that did not help.
print($e->getMessage());
Actual result:
--------------
I only get this line:
PHPUnit @version@ by Sebastian Bergmann.