public function ExceptionHandlerTest::testStatusCode in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/debug/Tests/ExceptionHandlerTest.php \Symfony\Component\Debug\Tests\ExceptionHandlerTest::testStatusCode()
File
- vendor/
symfony/ debug/ Tests/ ExceptionHandlerTest.php, line 54
Class
Namespace
Symfony\Component\Debug\TestsCode
public function testStatusCode() {
$handler = new ExceptionHandler(false, 'iso8859-1');
ob_start();
$handler
->sendPhpResponse(new NotFoundHttpException('Foo'));
$response = ob_get_clean();
$this
->assertContains('Sorry, the page you are looking for could not be found.', $response);
$expectedHeaders = array(
array(
'HTTP/1.0 404',
true,
null,
),
array(
'Content-Type: text/html; charset=iso8859-1',
true,
null,
),
);
$this
->assertSame($expectedHeaders, testHeader());
}