function RouterUnsupportedTest::testGenerateUnsupported
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php \Drupal\Tests\Core\Routing\RouterUnsupportedTest::testGenerateUnsupported()
Tests generate unsupported.
@legacy-covers ::generate
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RouterUnsupportedTest.php, line 28
Class
Namespace
Drupal\Tests\Core\RoutingCode
public function testGenerateUnsupported() : void {
$this->expectException(\BadMethodCallException::class);
$route_provider = $this->prophesize(RouteProviderInterface::class);
$current_path_stack = $this->prophesize(CurrentPathStack::class);
$route_name = 'test.route';
$router = new Router($route_provider->reveal(), $current_path_stack->reveal());
$router->generate($route_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.