コード例 #1
0
ファイル: BinaryStreamTest.php プロジェクト: bojaspus/zendamf
 public function testReadBytesShouldReturnSubsetOfStringFromCurrentNeedle()
 {
     $string = 'this is a short stream';
     $stream = new Util\BinaryStream($string);
     $test = $stream->readBytes(4);
     $this->assertEquals('this', $test);
     $test = $stream->readBytes(5);
     $this->assertEquals(' is a', $test);
 }