public function testApiAddReadStream_CallsReadHandler_OnTick($loop) { $stream = $this->createStream(); $loop->addReadStream($stream, $this->expectCallableExactly(2)); $this->writeToStream($stream, "foo\n"); $loop->tick(); $this->writeToStream($stream, "bar\n"); $loop->tick(); unset($stream); unset($loop); }