You are here

public function JsonResponseTest::testSetContentJsonSerializeError 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::testSetContentJsonSerializeError()

@expectedException \Exception @expectedExceptionMessage This error is expected

File

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

Class

JsonResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetContentJsonSerializeError() {
  if (!interface_exists('JsonSerializable')) {
    $this
      ->markTestSkipped('Interface JsonSerializable is available in PHP 5.4+');
  }
  $serializable = new JsonSerializableObject();
  JsonResponse::create($serializable);
}