function RouteProcessorManagerTest::getMockProcessor
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php \Drupal\Tests\Core\RouteProcessor\RouteProcessorManagerTest::getMockProcessor()
- 8.9.x core/tests/Drupal/Tests/Core/RouteProcessor/RouteProcessorManagerTest.php \Drupal\Tests\Core\RouteProcessor\RouteProcessorManagerTest::getMockProcessor()
- 10 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 72
Class
- RouteProcessorManagerTest
- @coversDefaultClass \Drupal\Core\RouteProcessor\RouteProcessorManager @group RouteProcessor
Namespace
Drupal\Tests\Core\RouteProcessorCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.