createCallback(0)); $parser->push($data); } /** * @expectedException \Amp\Parallel\Sync\ChannelException * @expectedExceptionMessage Invalid packet received: Invalid packet */ public function testInvalidHeaderData() { $data = "Invalid packet"; $parser = new ChannelParser($this->createCallback(0)); $parser->push($data); } /** * @expectedException \Amp\Parallel\Sync\ChannelException * @expectedExceptionMessage Invalid packet received: B \xf3\xf2\x0\x1 */ public function testInvalidHeaderBinaryData() { $data = "\x42\x20\xf3\xf2\x00\x01"; $parser = new ChannelParser($this->createCallback(0)); $parser->push($data); } }