示例#1
0
 /**
  * Called before each test exits, and before tearDown()
  */
 public function assertPostConditions()
 {
     if (!$this->getExpectedException()) {
         $this->assertEquals(200, $this->response->getCode());
         $this->assertNotEmpty($this->response->getTime());
         $this->assertEquals("HTTP/1.1", $this->response->getVersion());
         $this->assertContains($this->url, $this->response->getInformation()["url"]);
         $headers = $this->response->getHeaders();
         $this->assertEquals("unit-testing", $headers["X-Testing-Pong"]);
     }
 }
示例#2
0
 /**
  * @covers Headzoo\Web\Tools\WebResponse::getVersion
  */
 public function testGetVersion()
 {
     $this->assertEquals($this->values["version"], $this->response->getVersion());
 }