/** * Whenever the status chages the status line header is updated. * * @depends testInterface * @return null */ public function testGetSetStatus() { /* default status is 200 */ $result = $this->response->getStatus(); $this->assertInstanceOf('Appfuel\\Http\\HttpStatus', $result); $this->assertEquals(200, $result->getCode()); $expected = 'HTTP/1.0 200 OK'; $statusLine = $this->response->getStatusLine(); $this->assertEquals($expected, $statusLine); $status = new HttpStatus(400); $this->assertSame($this->response, $this->response->setStatus($status), 'exposes a fluent interface'); $this->assertEquals($status, $this->response->getStatus()); $expected = 'HTTP/1.0 400 Bad Request'; $statusLine = $this->response->getStatusLine(); $this->assertEquals($expected, $statusLine); }