class TimeTest extends PHPUnit_Framework_TestCase
public function testInTime()
// testing duration of a script is not
// a good test method since runtime can be
// affected by other causes.
$time = PHP_Timer::stop();
$message = sprintf('execution time was %s',
$this->assertLessThan(0, $time, $message);
Time: 1.1 seconds, Memory: 4.00MB
There was 1 failure:
execution time was 1 second
Failed asserting that 1.0000929832458496 is less than 0.
Tests: 1, Assertions: 0, Failures: 1.