PEAR is archived and read-only

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

Home » Testing » PHPUnit2 » Bug #4004

Exception messages are not shown

Details

Submitted2005-03-30 14:44 UTC
Fromsjoerd dot van dot der dot laag at philips dot com
StatusNo Feedback
PackagePHPUnit2
PHP Version5.0.3
OSWindows 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.