protected function HttpKernelTest::getResolver

18 calls to HttpKernelTest::getResolver()
HttpKernelTest::testHandleExceptionWithARedirectionResponse in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleHttpException in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleWhenAListenerReturnsAResponse in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleWhenAnExceptionIsHandledWithASpecificStatusCode in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
@dataProvider getStatusCodes
HttpKernelTest::testHandleWhenControllerThrowsAnExceptionAndRawIsFalse in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php

... See full list

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php, line 252

Class

HttpKernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

protected function getResolver($controller = null) {
  if (null === $controller) {
    $controller = function () {
      return new Response('Hello');
    };
  }
  $resolver = $this
    ->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
  $resolver
    ->expects($this
    ->any())
    ->method('getController')
    ->will($this
    ->returnValue($controller));
  $resolver
    ->expects($this
    ->any())
    ->method('getArguments')
    ->will($this
    ->returnValue(array()));
  return $resolver;
}