public function JsonResponseTest::testStaticCreateJsonObject 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::testStaticCreateJsonObject()
File
- vendor/
symfony/ http-foundation/ Tests/ JsonResponseTest.php, line 101
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testStaticCreateJsonObject() {
$response = JsonResponse::create(array(
'foo' => 'bar',
));
$this
->assertInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse', $response);
$this
->assertSame('{"foo":"bar"}', $response
->getContent());
}