I am wondering about what "strict mode is in PHPUnit" ?
eg:
phpunit --strict
or in phpunit.xml
<phpunit strict="true"/>
I turned it on just to try it and my tests started failing with
PHP_Invoker_TimeoutException: Execution aborted after 1 second
Please note that PHPUnit swallows all output that is emitted during the execution of a test. In strict mode, a test that emits output will fail.
That's all I could find in documentation, but I'd also checked the sources and I found that in strict mode:
Each test might be run with execution time limit depending on it's size and the presence of the pcntl extension and PHP_Invoker library. There are three timeouts values:
timeoutForSmallTests
(default value: 1)timeoutForMediumTests
(default value: 10)timeoutForLargeTests
(default value: 60)The test size (small, medium or large) is determined by the PHPUnit_Util_Test::getSize()
method:
PHPUnit_Extensions_Database_TestCase
or PHPUnit_Extensions_SeleniumTestCase
are large.It's seems that strict mode does only the above three changes, but I'm not absolutely sure about that. I have never studied PHPUnit's sources before, nor used strict mode.