You are here

public function LocalActionManagerTest::testGetTitle in Zircon Profile 8

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

@covers ::getTitle

File

core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php, line 129
Contains \Drupal\Tests\Core\Menu\LocalActionManagerTest.

Class

LocalActionManagerTest
@coversDefaultClass \Drupal\Core\Menu\LocalActionManager @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

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