This class provides functionality for serializing a RequestInterface instance to a string, as well as the reverse operation of creating a Request instance from a string/stream representing a message.
Inheritance: extends Phly\Http\AbstractSerializer
Beispiel #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);
 }