public testApiAddReadStream_CallsReadHandler_OnTick ( Kraken\Loop\LoopExtendedInterface | Kraken\Loop\LoopModelInterface | mixed $loop ) | ||
$loop | Kraken\Loop\LoopExtendedInterface | Kraken\Loop\LoopModelInterface | mixed |
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);
}