Exemple #1
0
 function testNormalDispatchWithTestingFlag()
 {
     $this->api->testing = true;
     $this->request->mock(array("REQUEST_URI" => "/route-1"));
     $this->assertEmpty($this->dispatch());
     $this->assertEmpty(HeaderStack::stack());
 }
Exemple #2
0
 function testSendCookies()
 {
     $cookie = new Cookie("name", "value");
     $this->response->addCookie($cookie);
     $this->request->mock();
     $this->send();
     $expected = array("HTTP/1.1 200 OK", "Date: " . $this->response->getHeader("Date"), "Content-Length: 0", "Set-Cookie: " . $cookie);
     $this->assertEquals($expected, HeaderStack::stack());
 }