[Solar-talk] Solar_Test_Suite doesn't print fatal errors
Mike Naberezny
mike at naberezny.com
Wed Sep 6 11:18:54 PDT 2006
Paul M Jones wrote:
> On Jul 20, 2006, at 3:10 PM, Antti Holvikari wrote:
>
>> Solar_Test_Suite doesn't print anything if it dies during run. I
>> believe this is because display_errors is set false during test run.
>> Obviously commenting out ini_set('display_errors', false); fixes this.
>>
>
> Mike Naberezny, do you know how PHPUnit deals with this?
>
To my knowledge, PHPUnit does not alter any INI settings except for
"xdebug.show_local_vars" unless the optional "-d" argument is given to
the command line runner specifying which INI settings to change.
Its TestCase class also provides a wrapper method for ini_set(). This
allows INI settings to be temporarily changed and the fixture state
automatically restored at teardown:
http://phpunit.de/browser/phpunit/tags/3.0.0alpha18/PHPUnit/Framework/TestCase.php
PHPUnit avoids the interpreter halting on compile-time errors by linting
with `php -l` before calling include():
http://phpunit.de/browser/phpunit/tags/3.0.0alpha18/PHPUnit/Util/Fileloader.php
Mike
More information about the solar-talk
mailing list