Exemple #1
0
 public function testToString()
 {
     $body = new Body();
     $body->append(rand(0, 100000));
     $response = new Response();
     $response->setBody($body);
     $message = new Message($response->toString());
     $this->assertSame(200, $message->getResponseCode());
     //$this->assertSame($body, $object->body);
     $this->assertSame('Skeetr 0.0.1', $message->getHeader('Server'));
     $this->assertSame('text/html', $message->getHeader('Content-Type'));
     $this->assertSame(strlen($body), $message->getHeader('Content-Length'));
 }
Exemple #2
0
 /**
  * Get the Response Code of the Message.
  *
  * @return string
  */
 public function getResponseCode()
 {
     return parent::getResponseCode();
 }