function testNormalDispatchWithTestingFlag() { $this->api->testing = true; $this->request->mock(array("REQUEST_URI" => "/route-1")); $this->assertEmpty($this->dispatch()); $this->assertEmpty(HeaderStack::stack()); }
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()); }