1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-13 09:37:26 +01:00
parallel/test/Sync/ChannelParserTest.php
Aaron Piotrowski c545be1dc5
More tests
2017-12-13 23:06:38 -06:00

20 lines
549 B
PHP

<?php
namespace Amp\Parallel\Test\Sync;
use Amp\Parallel\Sync\ChannelParser;
use Amp\PHPUnit\TestCase;
class ChannelParserTest extends TestCase {
/**
* @expectedException \Amp\Parallel\Sync\SerializationException
* @expectedExceptionMessage Exception thrown when unserializing data
*/
public function testCorruptedData() {
$data = "Invalid serialized data";
$data = \pack("CL", 0, \strlen($data)) . $data;
$parser = new ChannelParser($this->createCallback(0));
$parser->push($data);
}
}