You are here

public function ContextualLinkDefaultTest::testGetRouteName in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php \Drupal\Tests\Core\Menu\ContextualLinkDefaultTest::testGetRouteName()
  2. 9 core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php \Drupal\Tests\Core\Menu\ContextualLinkDefaultTest::testGetRouteName()

@covers ::getRouteName

File

core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php, line 112

Class

ContextualLinkDefaultTest
@group Menu @coversDefaultClass \Drupal\Core\Menu\ContextualLinkDefault

Namespace

Drupal\Tests\Core\Menu

Code

public function testGetRouteName($route_name = 'test_route_name') {
  $this->pluginDefinition['route_name'] = $route_name;
  $this
    ->setupContextualLinkDefault();
  $this
    ->assertEquals($route_name, $this->contextualLinkDefault
    ->getRouteName());
}