You are here

public function DisplayVariantTest::testGetWeight in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 62
Contains \Drupal\Tests\Core\Display\DisplayVariantTest.

Class

DisplayVariantTest
@coversDefaultClass \Drupal\Core\Display\VariantBase @group Display

Namespace

Drupal\Tests\Core\Display

Code

public function testGetWeight() {
  $display_variant = $this
    ->setUpDisplayVariant(array(
    'weight' => 5,
  ));
  $this
    ->assertSame(5, $display_variant
    ->getWeight());
}