/** * 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())); }
/** * @expectedException \InvalidArgumentException */ public function testThrowsWhenMessageIsUnknown() { $m = $this->getMockBuilder('GuzzleHttp\\Message\\AbstractMessage')->getMockForAbstractClass(); AbstractMessage::getStartLine($m); }