You are here

protected function RouteProcessorManagerTest::getMockProcessor in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php \Drupal\Tests\Core\RouteProcessor\RouteProcessorManagerTest::getMockProcessor()
  2. 9 core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php \Drupal\Tests\Core\RouteProcessor\RouteProcessorManagerTest::getMockProcessor()

Returns a mock Route processor object.

Parameters

string $route_name: The route name.

\Symfony\Component\Routing\Route $route: The Route to use in mock with() expectation.

array $parameters: The parameters to use in mock with() expectation.

Return value

\Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface|\PHPUnit\Framework\MockObject\MockObject

1 call to RouteProcessorManagerTest::getMockProcessor()
RouteProcessorManagerTest::testRouteProcessorManager in core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php
Tests the Route process manager functionality.

File

core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php, line 65

Class

RouteProcessorManagerTest
@coversDefaultClass \Drupal\Core\RouteProcessor\RouteProcessorManager @group RouteProcessor

Namespace

Drupal\Tests\Core\RouteProcessor

Code

protected function getMockProcessor($route_name, $route, $parameters) {
  $processor = $this
    ->createMock('Drupal\\Core\\RouteProcessor\\OutboundRouteProcessorInterface');
  $processor
    ->expects($this
    ->once())
    ->method('processOutbound')
    ->with($route_name, $route, $parameters);
  return $processor;
}