Make examples fail on any PHP diagnostic
Previously we called set_error_handler() in tests.php to do this, but that only sets it for the test-suite. Now we set it in on the PHP command line, which works for both.
This commit is contained in:
parent
e22dd47ff5
commit
d6f9f4b6c0
3 changed files with 1 additions and 14 deletions
|
|
@ -31,9 +31,7 @@ check::is_a($spam,"spam");
|
|||
check::equal(1,$spam->_foo,"1==spam->_foo");
|
||||
check::equal(2,$spam->_bar,"2==spam->_bar");
|
||||
// multiple inheritance not supported in PHP
|
||||
set_error_handler(function () {return true;}, E_NOTICE|E_WARNING); // Don't complain that _baz is unknown.
|
||||
check::equal(null,$spam->_baz,"null==spam->_baz");
|
||||
restore_error_handler();
|
||||
check::equal(4,$spam->_spam,"4==spam->_spam");
|
||||
|
||||
check::done();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue