You are here

public function FragmentListenerTest::testAccessDeniedWithWrongSignature in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\FragmentListenerTest::testAccessDeniedWithWrongSignature()

@expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException

File

vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php, line 68

Class

FragmentListenerTest

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testAccessDeniedWithWrongSignature() {
  $request = Request::create('http://example.com/_fragment', 'GET', array(), array(), array(), array(
    'REMOTE_ADDR' => '10.0.0.1',
  ));
  $listener = new FragmentListener(new UriSigner('foo'));
  $event = $this
    ->createGetResponseEvent($request);
  $listener
    ->onKernelRequest($event);
}