function ShortcutLocalTasksTest::testShortcutPageLocalTasks

Same name in other branches
  1. 9 core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php \Drupal\Tests\shortcut\Unit\Menu\ShortcutLocalTasksTest::testShortcutPageLocalTasks()
  2. 8.9.x core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php \Drupal\Tests\shortcut\Unit\Menu\ShortcutLocalTasksTest::testShortcutPageLocalTasks()
  3. 11.x core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php \Drupal\Tests\shortcut\Unit\Menu\ShortcutLocalTasksTest::testShortcutPageLocalTasks()

Checks shortcut listing local tasks.

@dataProvider getShortcutPageRoutes

File

core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php, line 41

Class

ShortcutLocalTasksTest
Tests existence of shortcut local tasks.

Namespace

Drupal\Tests\shortcut\Unit\Menu

Code

public function testShortcutPageLocalTasks($route) : void {
    $tasks = [
        0 => [
            'shortcut.set_switch',
            'entity.user.canonical',
            'entity.user.edit_form',
        ],
    ];
    $this->assertLocalTasks($route, $tasks);
}

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