示例#1
0
 /**
  * Gets the state of a message as a hash.
  *
  * @param MessageInterface $msg
  *
  * @return array|null
  */
 private function messageState(MessageInterface $msg = null)
 {
     return !$msg ? null : array('start-line' => AbstractMessage::getStartLine($msg), 'headers' => AbstractMessage::getHeadersAsString($msg), 'body' => $this->streamState($msg->getBody()));
 }
示例#2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testThrowsWhenMessageIsUnknown()
 {
     $m = $this->getMockBuilder('GuzzleHttp\\Message\\AbstractMessage')->getMockForAbstractClass();
     AbstractMessage::getStartLine($m);
 }