ShortcutLocalTasksTest.php in Drupal 8
File
core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php
View source
<?php
namespace Drupal\Tests\shortcut\Unit\Menu;
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;
class ShortcutLocalTasksTest extends LocalTaskIntegrationTestBase {
protected function setUp() {
$this->directoryList = [
'shortcut' => 'core/modules/shortcut',
'user' => 'core/modules/user',
];
parent::setUp();
}
public function testShortcutPageLocalTasks($route) {
$tasks = [
0 => [
'shortcut.set_switch',
'entity.user.canonical',
'entity.user.edit_form',
],
];
$this
->assertLocalTasks($route, $tasks);
}
public function getShortcutPageRoutes() {
return [
[
'entity.user.canonical',
],
[
'entity.user.edit_form',
],
[
'shortcut.set_switch',
],
];
}
}