function BreakpointTest::testGetLabel

Same name and namespace in other branches
  1. 9 core/modules/breakpoint/tests/src/Unit/BreakpointTest.php \Drupal\Tests\breakpoint\Unit\BreakpointTest::testGetLabel()
  2. 10 core/modules/breakpoint/tests/src/Unit/BreakpointTest.php \Drupal\Tests\breakpoint\Unit\BreakpointTest::testGetLabel()
  3. 11.x core/modules/breakpoint/tests/src/Unit/BreakpointTest.php \Drupal\Tests\breakpoint\Unit\BreakpointTest::testGetLabel()

@covers ::getLabel

File

core/modules/breakpoint/tests/src/Unit/BreakpointTest.php, line 62

Class

BreakpointTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21breakpoint%21src%21Breakpoint.php/class/Breakpoint/8.9.x" title="Default object used for breakpoint plugins." class="local">\Drupal\breakpoint\Breakpoint</a> @group Breakpoint

Namespace

Drupal\Tests\breakpoint\Unit

Code

public function testGetLabel() {
    $this->pluginDefinition['label'] = 'Test label';
    $this->setupBreakpoint();
    $this->assertEquals(new TranslatableMarkup('Test label', [], [
        'context' => 'breakpoint',
    ], $this->stringTranslation), $this->breakpoint
        ->getLabel());
}

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