You are here

public function LocalTaskManagerTest::testGetTitle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::testGetTitle()

Tests the getTitle method.

See also

\Drupal\system\Plugin\Type\MenuLocalTaskManager::getTitle()

File

core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php, line 240
Contains \Drupal\Tests\Core\Menu\LocalTaskManagerTest.

Class

LocalTaskManagerTest
@coversDefaultClass \Drupal\Core\Menu\LocalTaskManager @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

public function testGetTitle() {
  $menu_local_task = $this
    ->getMock('Drupal\\Core\\Menu\\LocalTaskInterface');
  $menu_local_task
    ->expects($this
    ->once())
    ->method('getTitle');
  $this->controllerResolver
    ->expects($this
    ->once())
    ->method('getArguments')
    ->with($this->request, array(
    $menu_local_task,
    'getTitle',
  ))
    ->will($this
    ->returnValue(array()));
  $this->manager
    ->getTitle($menu_local_task);
}