Exemplo n.º 1
0
 public function testBlockIsBlocking()
 {
     declare (ticks=1);
     $clock = new Clock();
     $clock->addTimer(1, function () {
     });
     $start = microtime(true);
     $clock->block();
     $duration = microtime(true) - $start;
     $this->assertGreaterThan(1, $duration);
     $this->assertLessThan(1.001, $duration);
 }