function LocalActionManagerTest::testGetTitle

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php \Drupal\Tests\Core\Menu\LocalActionManagerTest::testGetTitle()
  2. 8.9.x core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php \Drupal\Tests\Core\Menu\LocalActionManagerTest::testGetTitle()
  3. 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 140

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

public function testGetTitle() : void {
    $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',
    ])
        ->willReturn([
        'test',
    ]);
    $this->localActionManager
        ->getTitle($local_action);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.