Hi ; I am writing PHPUnit test cases for my application.
I wonder how can i get http status codes?
My test like this :
public function testIndexActionCanBeAccessed()
{
$this->application->handle('/');
$this->assertEquals('index', $this->application->dispatcher->getActionName());
$this->assertEquals('index', $this->application->dispatcher->getControllerName());
$this->assertEquals('welcome', $this->application->dispatcher->getModuleName());
}
I want to add another one assertion
$this->assertEquals(200, HTTP_RESPONSE_STATUS_CODE);
how can i do this?