You are here

protected function RequestDataCollectorTest::injectController in Zircon Profile 8

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

Inject the given controller callable into the data collector.

1 call to RequestDataCollectorTest::injectController()
RequestDataCollectorTest::testControllerInspection in vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php
Test various types of controller callables.

File

vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php, line 186

Class

RequestDataCollectorTest

Namespace

Symfony\Component\HttpKernel\Tests\DataCollector

Code

protected function injectController($collector, $controller, $request) {
  $resolver = $this
    ->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
  $httpKernel = new HttpKernel(new EventDispatcher(), $resolver);
  $event = new FilterControllerEvent($httpKernel, $controller, $request, HttpKernelInterface::MASTER_REQUEST);
  $collector
    ->onKernelController($event);
}