Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

L'audit Qualité par SensioLabs

200 points de contrôle de votre applicatif web.
audit.sensiolabs.com

gravatar
Enhanced Error Reporting in lime 1.0.9
by Bernhard Schussek – June 11, 2010 – 2 comments

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.

Add a Comment

You must be connected to post a comment.

Comments RSS

  • gravatar
    #1 Alex Gilbert said on the 2010/06/11 at 22:31
    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.
  • gravatar
    #2 Jonathan Nieto said on the 2010/06/12 at 00:46
    Thanks! This will make my life much easier!