You are here

public function ContextualLinkDefaultTest::testGetWeight 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::testGetWeight()
  2. 9 core/tests/Drupal/Tests/Core/Menu/ContextualLinkDefaultTest.php \Drupal\Tests\Core\Menu\ContextualLinkDefaultTest::testGetWeight()

@covers ::getWeight

File

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

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

public function testGetWeight($weight = 5) {
  $this->pluginDefinition['weight'] = $weight;
  $this
    ->setupContextualLinkDefault();
  $this
    ->assertEquals($weight, $this->contextualLinkDefault
    ->getWeight());
}