function UserLocalTasksTest::testUserPageLocalTasks

Same name in other branches
  1. 8.9.x core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::testUserPageLocalTasks()
  2. 10 core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::testUserPageLocalTasks()
  3. 11.x core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::testUserPageLocalTasks()

Checks user listing local tasks.

@dataProvider getUserPageRoutes

File

core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php, line 80

Class

UserLocalTasksTest
Tests user local tasks.

Namespace

Drupal\Tests\user\Unit\Menu

Code

public function testUserPageLocalTasks($route, $subtask = []) {
    $tasks = [
        0 => [
            'entity.user.canonical',
            'entity.user.edit_form',
        ],
    ];
    if ($subtask) {
        $tasks[] = $subtask;
    }
    $this->assertLocalTasks($route, $tasks);
}

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