Ejemplo n.º 1
0
 public function __construct(Pulse $pulse = null)
 {
     $this->timers = new Timers($this);
     $this->pulse = $pulse ?: Pulse::getInstance();
     $this->pulseCallback = array($this, 'tick');
     $this->pulse->on('tick', $this->pulseCallback);
 }
Ejemplo n.º 2
0
 public function testGetInstanceShouldReturnTheSamePulse()
 {
     $this->assertSame(Pulse::getInstance(), Pulse::getInstance());
 }