Set validation timeout duration using PHPUnit

I have some test cases that can happen in an infinite loop on error. Is there a built-in way to set the validation timeout duration using PHPUnit?

If not, which of the most unobtrusive ways to add this feature to a test case?

+6
php unit-testing phpunit
source share
2 answers

Perhaps you can use PerformanceTestCase , you can set setMaxRunningTime () test for it.

+2
source share

You can use strict mode to set time limits:

phpunit --strict 

or

 <phpunit strict="true"> 

What does PHPUnit Strict mode do?

+3
source share

All Articles