public function EntityResolverManagerTest::testSetRouteOptionsWithContentController 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::testSetRouteOptionsWithContentController()
Tests setRouteOptions() with a _content default.
@covers ::setRouteOptions @covers ::getControllerClass
@dataProvider providerTestSetRouteOptionsWithContentController
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityResolverManagerTest.php, line 135 - Contains \Drupal\Tests\Core\Entity\EntityResolverManagerTest.
Class
- EntityResolverManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityResolverManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testSetRouteOptionsWithContentController($controller) {
$route = new Route('/example/{argument}', array(
'_controller' => $controller,
'argument' => 'test',
));
$defaults = $route
->getDefaults();
$this->entityResolverManager
->setRouteOptions($route);
$this
->assertEquals($defaults, $route
->getDefaults());
$this
->assertEmpty($route
->getOption('parameters'));
}