private function PermissionsTest::getToAddLinkPage in Menu Item Role Access 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/PermissionsTest.php \Drupal\Tests\menu_item_role_access\Functional\PermissionsTest::getToAddLinkPage()
Goes through the process to get to the add link page.
Parameters
\Drupal\user\Entity\User $user: A user who exists within the system.
2 calls to PermissionsTest::getToAddLinkPage()
- PermissionsTest::testMenuItemRoleAccessFieldExists in tests/
src/ Functional/ PermissionsTest.php - Assert that a our field to control access exists.
- PermissionsTest::testMenuItemRoleAccessFieldNoPermission in tests/
src/ Functional/ PermissionsTest.php - Assert that a our field to control access does not exist.
File
- tests/
src/ Functional/ PermissionsTest.php, line 101
Class
- PermissionsTest
- Tests handling of menu links hierarchies.
Namespace
Drupal\Tests\menu_item_role_access\FunctionalCode
private function getToAddLinkPage(User $user) {
// Log in the administrator.
$this
->drupalLogin($user);
// Test the 'Add link' local action.
$this
->drupalGet(Url::fromRoute('entity.menu.edit_form', [
'menu' => $this->menuName,
]));
$this
->clickLink('Add link');
}