/** @test */ public function pausedStreamShouldQueueFrames() { $frame = new Frame('CONNECT'); $output = new OutputStream($this->loop); $output->pause(); $output->on('data', $this->expectCallableNever()); $output->sendFrame($frame); $output->removeAllListeners(); $output->on('data', $this->expectCallableOnce()); $output->resume(); }