public function JsonResponseTest::testCreate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/JsonResponseTest.php \Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testCreate()
File
- vendor/
symfony/ http-foundation/ Tests/ JsonResponseTest.php, line 78
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testCreate() {
$response = JsonResponse::create(array(
'foo' => 'bar',
), 204);
$this
->assertInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse', $response);
$this
->assertEquals('{"foo":"bar"}', $response
->getContent());
$this
->assertEquals(204, $response
->getStatusCode());
}