public function JsonResponseTest::testConstructorWithSimpleTypes 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::testConstructorWithSimpleTypes()
File
- vendor/
symfony/ http-foundation/ Tests/ JsonResponseTest.php, line 36
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testConstructorWithSimpleTypes() {
$response = new JsonResponse('foo');
$this
->assertSame('"foo"', $response
->getContent());
$response = new JsonResponse(0);
$this
->assertSame('0', $response
->getContent());
$response = new JsonResponse(0.1);
$this
->assertSame('0.1', $response
->getContent());
$response = new JsonResponse(true);
$this
->assertSame('true', $response
->getContent());
}