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