src/Extension/Symfony.php
public static function assertJsonResponse(Response $response, $statusCode = 200)
    {
        \PHPUnit\Framework\Assert::assertEquals(
            $statusCode,
            $response->getStatusCode(),
            $response->getContent()
        );
        \PHPUnit\Framework\Assert::assertTrue(
            $response->headers->contains('Content-Type', 'application/json'),
            $response->headers
        );
    }
public static function assertJsonResponse(Response $response, $statusCode = 200)
    {
        \PHPUnit\Framework\Assert::assertEquals(
            $statusCode,
            $response->getStatusCode(),
            $response->getContent()
        );
        \PHPUnit\Framework\Assert::assertTrue(
            $response->headers->contains('Content-Type', 'application/json'),
            $response->headers
        );
    }
public static function assertJsonResponse ( Response $ response , $ statusCode = 200 ) { \ PHPUnit \ Framework \ Assert :: assertEquals ( $ statusCode , $ response -> getStatusCode ( ) , $ response -> getContent ( ) ) ; \ PHPUnit \ Framework \ Assert :: assertTrue ( $ response -> headers -> contains ( 'Content-Type' , 'application/json' ) , $ response -> headers ) ; }
Asserts that a response is successful and of type json.

@param Response $response   Response object
@param int      $statusCode Expected status code (default 200)

@see \Bazinga\Bundle\RestExtraBundle\Test\WebTestCase::assertJsonResponse()
Asserts that a response is successful and of type json .