You are here

public function LocalActionManagerTest::testGetTitle in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php \Drupal\Tests\Core\Menu\LocalActionManagerTest::testGetTitle()
  2. 10 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 143
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
    ->createMock('Drupal\\Core\\Menu\\LocalActionInterface');
  $local_action
    ->expects($this
    ->once())
    ->method('getTitle')
    ->with('test');
  $this->argumentResolver
    ->expects($this
    ->once())
    ->method('getArguments')
    ->with($this->request, [
    $local_action,
    'getTitle',
  ])
    ->will($this
    ->returnValue([
    'test',
  ]));
  $this->localActionManager
    ->getTitle($local_action);
}