public function LocalTaskDefaultTest::testGetTitle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php \Drupal\Tests\Core\Menu\LocalTaskDefaultTest::testGetTitle()
@covers ::getTitle
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalTaskDefaultTest.php, line 235 - Contains \Drupal\Tests\Core\Menu\LocalTaskDefaultTest.
Class
- LocalTaskDefaultTest
- @coversDefaultClass \Drupal\Core\Menu\LocalTaskDefault @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function testGetTitle() {
$this->pluginDefinition['title'] = new TranslatableMarkup('Example', [], [], $this->stringTranslation);
$this->stringTranslation
->expects($this
->once())
->method('translateString')
->with($this->pluginDefinition['title'])
->will($this
->returnValue('Example translated'));
$this
->setupLocalTaskDefault();
$this
->assertEquals('Example translated', $this->localTaskBase
->getTitle());
}