You are here

protected function HttpKernelTest::getResolver in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/HttpKernelTest.php \Symfony\Component\HttpKernel\Tests\HttpKernelTest::getResolver()
20 calls to HttpKernelTest::getResolver()
HttpKernelTest::testHandleExceptionWithARedirectionResponse in vendor/symfony/http-kernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleHttpException in vendor/symfony/http-kernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleWhenAListenerReturnsAResponse in vendor/symfony/http-kernel/Tests/HttpKernelTest.php
HttpKernelTest::testHandleWhenAnExceptionIsHandledWithASpecificStatusCode in vendor/symfony/http-kernel/Tests/HttpKernelTest.php
@dataProvider getStatusCodes
HttpKernelTest::testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered in vendor/symfony/http-kernel/Tests/HttpKernelTest.php
@expectedException \RuntimeException

... See full list

File

vendor/symfony/http-kernel/Tests/HttpKernelTest.php, line 274

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;
}