You are here

public function JsonResponseTest::testStaticCreateJsonArray in Zircon Profile 8

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

File

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

Class

JsonResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testStaticCreateJsonArray() {
  $response = JsonResponse::create(array(
    0,
    1,
    2,
    3,
  ));
  $this
    ->assertInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse', $response);
  $this
    ->assertSame('[0,1,2,3]', $response
    ->getContent());
}