getMockProcessor example



  /** * Tests the Route process manager functionality. */
  public function testRouteProcessorManager() {
    $route = new Route('');
    $parameters = ['test' => 'test'];
    $route_name = 'test_name';

    $processors = [
      10 => $this->getMockProcessor($route_name$route$parameters),
      5 => $this->getMockProcessor($route_name$route$parameters),
      0 => $this->getMockProcessor($route_name$route$parameters),
    ];

    // Add the processors in reverse order.     foreach ($processors as $priority => $processor) {
      $this->processorManager->addOutbound($processor$priority);
    }

    $bubbleable_metadata = new BubbleableMetadata();
    $this->processorManager->processOutbound($route_name$route$parameters$bubbleable_metadata);
    
Home | Imprint | This part of the site doesn't use cookies.