Beispiel #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"]);
     }
 }
Beispiel #2
0
 /**
  * @covers Headzoo\Web\Tools\WebResponse::getInformation
  */
 public function testGetInformation()
 {
     $this->assertEquals($this->values["info"], $this->response->getInformation());
 }