RouterUnsupportedTest.php
Same filename and directory in other branches
Namespace
Drupal\Tests\Core\RoutingFile
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RouterUnsupportedTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\Core\Routing;
use Drupal\Core\Path\CurrentPathStack;
use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\Core\Routing\Router;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
/**
* Tests Drupal\Core\Routing\Router.
*/
class RouterUnsupportedTest extends UnitTestCase {
/**
* Tests generate unsupported.
*/
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);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| RouterUnsupportedTest | Tests Drupal\Core\Routing\Router. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.