function DisplayVariantTest::testGetWeight
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testGetWeight()
- 8.9.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testGetWeight()
- 11.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testGetWeight()
Tests the getWeight() method.
@covers ::getWeight
File
-
core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php, line 59
Class
- DisplayVariantTest
- @coversDefaultClass \Drupal\Core\Display\VariantBase @group Display
Namespace
Drupal\Tests\Core\DisplayCode
public function testGetWeight() : void {
$display_variant = $this->setUpDisplayVariant([
'weight' => 5,
]);
$this->assertSame(5, $display_variant->getWeight());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.