diff --git a/tests/FunctionResolveTest.php b/tests/FunctionResolveTest.php index 1bc7da2..0bfdc21 100644 --- a/tests/FunctionResolveTest.php +++ b/tests/FunctionResolveTest.php @@ -50,7 +50,7 @@ public function testCancellingPromiseWillCancelLoopTimer() { $loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock(); - $timer = $this->getMockBuilder('React\EventLoop\Timer\TimerInterface')->getMock(); + $timer = $this->getMockBuilder(interface_exists('React\EventLoop\TimerInterface') ? 'React\EventLoop\TimerInterface' : 'React\EventLoop\Timer\TimerInterface')->getMock(); $loop->expects($this->once())->method('addTimer')->will($this->returnValue($timer)); $promise = Timer\resolve(0.01, $loop);