public function EntityResolverManagerTest::testSetRouteOptionsWithStandardRoute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php \Drupal\Tests\Core\Entity\EntityResolverManagerTest::testSetRouteOptionsWithStandardRoute()
Tests setRouteOptions() with no parameter.
We don't have any entity type involved, so we don't need any upcasting.
@covers ::setRouteOptions @covers ::getControllerClass
@dataProvider providerTestSetRouteOptionsWithStandardRoute
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityResolverManagerTest.php, line 76 - Contains \Drupal\Tests\Core\Entity\EntityResolverManagerTest.
Class
- EntityResolverManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityResolverManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testSetRouteOptionsWithStandardRoute($controller) {
$route = new Route('/example', array(
'_controller' => $controller,
));
$defaults = $route
->getDefaults();
$this->entityResolverManager
->setRouteOptions($route);
$this
->assertEquals($defaults, $route
->getDefaults());
$this
->assertEmpty($route
->getOption('parameters'));
}