public function StreamedResponseTest::testConstructor in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/StreamedResponseTest.php \Symfony\Component\HttpFoundation\Tests\StreamedResponseTest::testConstructor()
File
- vendor/
symfony/ http-foundation/ Tests/ StreamedResponseTest.php, line 19
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testConstructor() {
$response = new StreamedResponse(function () {
echo 'foo';
}, 404, array(
'Content-Type' => 'text/plain',
));
$this
->assertEquals(404, $response
->getStatusCode());
$this
->assertEquals('text/plain', $response->headers
->get('Content-Type'));
}