This is a very common issue, especially when you are running tests on a production server or when the tester isn't very aware of the PHP configuration.
The issue is related to php.ini
settings, as pointed by Alexander Yancharuk in his answer and all the solutions he suggests work fine.
But there is another solution that may be useful, as it was for me, which is to set the appropriate PHP settings in the PHPUnit configuration file (XML) itself, as follows:
<phpunit>
<suites>
...
</suites>
<php>
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
</php>
</phpunit>
Using this you can personalize not only error display, but a lot of PHP configuration, specifically for your test suite, leaving your production configuration untouched and without having to write a bootstrap file only for this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…