Пример #1
0
 /**
  * @dataProvider getControllerWithArgsFixtures
  */
 public function testNoAutoConvert($controllerCallable)
 {
     $kernel = $this->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
     $request = new Request(array(), array(), array('date' => '2014-03-14 09:00:00'));
     $listener = new ParamConverterListener($this->getParamConverterManager($request, array()), false);
     $event = new FilterControllerEvent($kernel, $controllerCallable, $request, null);
     $listener->onKernelController($event);
 }
 public function testRequestIsSkipped()
 {
     $kernel = $this->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
     $request = new Request();
     $manager = $this->getMock('Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager');
     $manager->expects($this->once())->method('apply')->with($this->equalTo($request), $this->equalTo(array()));
     $listener = new ParamConverterListener($manager);
     $event = new FilterControllerEvent($kernel, array(new TestController(), 'execute'), $request, null);
     $listener->onKernelController($event);
 }