Inheritance: extends Phly\Http\AbstractSerializer
Esempio n. 1
0
 public function testFromStreamThrowsExceptionWhenStreamIsNotSeekable()
 {
     $this->setExpectedException('InvalidArgumentException');
     $stream = $this->getMockBuilder('Psr\\Http\\Message\\StreamInterface')->getMock();
     $stream->expects($this->once())->method('isReadable')->will($this->returnValue(true));
     $stream->expects($this->once())->method('isSeekable')->will($this->returnValue(false));
     Serializer::fromStream($stream);
 }