public function addTimer($interval, $callback)
{
return $this->getLoop()->addTimer($interval, $callback);
}
/** * Tests addTimer(). */ public function testAddTimer() { $interval = 5; $callback = function () { }; $timer = $this->getMockTimer(); $loop = $this->getMockLoop(); Phake::when($loop)->addTimer($interval, $callback)->thenReturn($timer); Phake::when($this->client)->getLoop()->thenReturn($loop); $this->assertSame($timer, $this->client->addTimer($interval, $callback)); }