public function EntityResolverManagerTest::testSetRouteOptionsWithEntityFormNoUpcasting in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php \Drupal\Tests\Core\Entity\EntityResolverManagerTest::testSetRouteOptionsWithEntityFormNoUpcasting()
- 9 core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php \Drupal\Tests\Core\Entity\EntityResolverManagerTest::testSetRouteOptionsWithEntityFormNoUpcasting()
Tests setRouteOptions() with a form parameter without interface.
@covers ::setRouteOptions @covers ::getControllerClass @covers ::getEntityTypes @covers ::setParametersFromReflection
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityResolverManagerTest.php, line 276 - Contains \Drupal\Tests\Core\Entity\EntityResolverManagerTest.
Class
- EntityResolverManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityResolverManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testSetRouteOptionsWithEntityFormNoUpcasting() {
$this
->setupEntityTypes();
$route = new Route('/example/{entity_test}', [
'_form' => 'Drupal\\Tests\\Core\\Entity\\BasicFormNoUpcasting',
]);
$defaults = $route
->getDefaults();
$this->entityResolverManager
->setRouteOptions($route);
$this
->assertEquals($defaults, $route
->getDefaults());
$this
->assertEmpty($route
->getOption('parameters'));
}