[Stopwatch] Fix test
This commit is contained in:
parent
6e1ae53fea
commit
9de0d60b2c
@ -119,12 +119,12 @@ class StopwatchEventTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testStartTime()
|
public function testStartTime()
|
||||||
{
|
{
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$this->assertLessThan(0.5, $event->getStartTime());
|
$this->assertLessThanOrEqual(0.5, $event->getStartTime());
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertLessThan(1, $event->getStartTime());
|
$this->assertLessThanOrEqual(1, $event->getStartTime());
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
|
Reference in New Issue
Block a user