public function JsonResponseTest::testSetCallbackInvalidIdentifier

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php, line 100

Class

JsonResponseTest
@covers Symfony\Component\HttpFoundation\JsonResponse::__construct @covers Symfony\Component\HttpFoundation\JsonResponse::setData @covers Symfony\Component\HttpFoundation\JsonResponse::setCallback

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetCallbackInvalidIdentifier() {
  $response = new JsonResponse('foo');
  $this
    ->setExpectedException('InvalidArgumentException');
  $response
    ->setCallback('+invalid');
}