It doesn't appear to do it by default, and I don't see any switch for it either.
This is PHPUnit 2.3.5, and PHP 5.2.0-8.
It doesn't appear to do it by default, and I don't see any switch for it either.
This is PHPUnit 2.3.5, and PHP 5.2.0-8.
Your available option appears to be using set_error_handler() to override the error process (PHPUnit installs its own, which you'd be replacing). Then you'd either duplicate what PHPUnit's error handler does, except triggering failure on E_NOTICEs, or hand off to PHPUnit's error handler (which you'll get a handle to returned from set_error_handler()) and fake up E_NOTICES as something more critical.
function exception_error_handler($errno, $errstr, $errfile, $errline )
{
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler("exception_error_handler");
You want to upgrade to a more recent version of PHPUnit, have a look at http://www.phpunit.de/.