public function testRedirectTemporary() { $builder = new Ergo_Http_ResponseBuilder(); $response = $builder->found('http://example.org/test')->build(); $this->assertEqual($response->getStatus()->getCode(), 302); $this->assertFalse($response->hasBody()); $headers = $response->getHeaders()->toArray(); $this->assertEqual(count($headers), 2, 'should be 2 header: %s'); $this->assertEqual($headers[0], "Location: http://example.org/test\r\n"); $this->assertEqual($headers[1], "Content-Length: 0\r\n"); }