Answer the question
In order to leave comments, you need to log in
Why doesn't PHPUnit catch PHP notice "Undefined index"?
Installed another version of phpunit (3.7.32) and now errors like: PHP notice "Undefined index x" are not caught.
For example, if I access a variable in a test that is not initialized or a non-existent array element, then phpunit will not throw an error.
And on another server (phpunit 3.7.27) in the same tests, this is not repeated.
Maybe you need to install some additional component or make some settings with phpunit?
PHP 5.4.26
Yii 1.1.14
Answer the question
In order to leave comments, you need to log in
OK, so if anyone has trouble with getting none or incomplete output from PHPUnit command line, double-check your php.ini configuration directives:
error_reporting - should be set to E_ALL | E_STRICT for your development environment
display_errors - should be set to On
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question