You are here

public function BreakpointTest::testGetLabel in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 66
Contains \Drupal\Tests\breakpoint\Unit\BreakpointTest.

Class

BreakpointTest
@coversDefaultClass \Drupal\breakpoint\Breakpoint @group Breakpoint

Namespace

Drupal\Tests\breakpoint\Unit

Code

public function testGetLabel() {
  $this->pluginDefinition['label'] = 'Test label';
  $this->stringTranslation
    ->expects($this
    ->once())
    ->method('translate')
    ->with($this->pluginDefinition['label'], array(), array(
    'context' => 'breakpoint',
  ))
    ->will($this
    ->returnValue('Test label translated'));
  $this
    ->setupBreakpoint();
  $this
    ->assertEquals('Test label translated', $this->breakpoint
    ->getLabel());
}