public function ControllerResolverTest::testGetArgumentsWithRouteMatchAndRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\ControllerResolverTest::testGetArgumentsWithRouteMatchAndRequest()
Tests getArguments with a route match and a request.
@covers ::getArguments @covers ::doGetArguments
File
- core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 226 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Class
- ControllerResolverTest
- @coversDefaultClass \Drupal\Core\Controller\ControllerResolver @group Controller
Namespace
Drupal\Tests\Core\ControllerCode
public function testGetArgumentsWithRouteMatchAndRequest() {
$request = Request::create('/test');
$mock_controller = new MockController();
$arguments = $this->controllerResolver
->getArguments($request, [
$mock_controller,
'getControllerWithRequestAndRouteMatch',
]);
$this
->assertEquals([
RouteMatch::createFromRequest($request),
$request,
], $arguments);
}