Enhanced Error Reporting in lime 1.0.9

With the release of symfony 1.3.5 and 1.4.5, the testing library lime was updated to version 1.0.9. Apart from smaller bug fixes, this version features improved error reporting for exceptions, warning and notice errors.

Exception Reporting

Before this update lime used to present many failing tests as "dubious". This status indicated that PHP was interrupted in the test, for example because an exception was thrown or because of a segmentation fault. Unfortunately, "dubious" doesn't help a lot to inform about the real problem.

Exceptions before lime 1.0.9

lime now tries to catch exceptions thrown in your code. When you run your test suite, these exception messages are included in the output. Such tests are now marked clearly with the label "errors".

Exceptions with lime 1.0.9

PHP Warnings and Notices

lime is now also able to catch PHP warning and notice errors. Before this update, such errors were silently ignored. Your tests were marked as successful even though there might have been a load of errors!

Warnings before lime 1.0.9

To fix this critical problem, we added the option "error_reporting" to the class lime_test. When you set this option to true, these PHP errors are caught and clearly highlighted in the test output.

$t = new lime_test(7, array('error_reporting' => true));

Warnings with lime 1.0.9

They are also included in the output of the test suite.

Warnings in the test suite output

For backwards compatibility reasons, the default value for this option remains false. We highly recommend though to set it to true in all of your test scripts to prevent unnoticed errors.

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.


This is great news! Thanks for including this in the update.

Even though I was always amused by the word "dubious" getting thrown around in my test results, this will be very helpful.
Thanks! This will make my life much easier!

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.