You are here

public function JsonResponseTest::testConstructorWithArrayCreatesJsonArray in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/JsonResponseTest.php \Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testConstructorWithArrayCreatesJsonArray()

File

vendor/symfony/http-foundation/Tests/JsonResponseTest.php, line 24

Class

JsonResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testConstructorWithArrayCreatesJsonArray() {
  $response = new JsonResponse(array(
    0,
    1,
    2,
    3,
  ));
  $this
    ->assertSame('[0,1,2,3]', $response
    ->getContent());
}