function DisplayVariantTest::testLabel

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testLabel()
  2. 10 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testLabel()
  3. 11.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testLabel()

Tests the label() method.

@covers ::label

File

core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php, line 37

Class

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

Namespace

Drupal\Tests\Core\Display

Code

public function testLabel() {
    $display_variant = $this->setUpDisplayVariant([
        'label' => 'foo',
    ]);
    $this->assertSame('foo', $display_variant->label());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.