Skip to content

Commit 69aa951

Browse files
committed
Fix StreamSelectLoopTest::testSmallTimerInterval to expect nanoseconds.
1 parent 1044a6f commit 69aa951

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/StreamSelectLoopTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ protected function forkSendSignal($signal)
156156
public function testSmallTimerInterval()
157157
{
158158
/** @var StreamSelectLoop|\PHPUnit_Framework_MockObject_MockObject $loop */
159-
$loop = $this->getMock('React\EventLoop\StreamSelectLoop', ['streamSelect']);
159+
$loop = $this->getMock('React\EventLoop\StreamSelectLoop', ['sleep']);
160160
$loop
161161
->expects($this->at(0))
162-
->method('streamSelect')
163-
->with([], [], 1);
162+
->method('sleep')
163+
->with(0, intval(Timer::MIN_INTERVAL * StreamSelectLoop::NANOSECONDS_PER_SECOND));
164164
$loop
165165
->expects($this->at(1))
166-
->method('streamSelect')
167-
->with([], [], 0);
166+
->method('sleep')
167+
->with(0, 0);
168168

169169
$callsCount = 0;
170170
$loop->addPeriodicTimer(Timer::MIN_INTERVAL, function() use (&$loop, &$callsCount) {

0 commit comments

Comments
 (0)