/** * Method to test getStatusCode(). * * @return void * * @covers \Windwalker\Http\Response::getStatusCode * @covers \Windwalker\Http\Response::withStatus */ public function testWithAndGetStatusCode() { $this->assertEquals(200, $this->instance->getStatusCode()); $res = $this->instance->withStatus(403); $this->assertNotSame($res, $this->instance); $this->assertEquals(403, $res->getStatusCode()); $res = $res->withStatus(500, 'Unknown error'); $this->assertEquals(500, $res->getStatusCode()); $this->assertEquals('Unknown error', $res->getReasonPhrase()); }