I am building a testing script which is checking the performance of a set of commands. The test script needs to let it run for a specific amount of time before failing the test.
I found the PerformanceTestCase in the PHPUnit documentation website, but when I tried to use it I realised that it’s old functionality which hasn’t been included within the new version. (That doc is PHPUnit 3.0, and my version is 3.5).
Is there an equivalent for this functionality within PHPUnit 3.5, and how do I use it?
I ran into a smiliar issue today – I needed to test an external HTTP call was occuring within the allocated time.
Rather than build another loop or take $start and $end time readings – I exposed the timed_out param, detailed here http://www.php.net/manual/en/function.stream-get-meta-data.php