function UserPermissionsTest::setUp
Same name in this branch
- 9 core/modules/user/tests/src/Functional/UserPermissionsTest.php \Drupal\Tests\user\Functional\UserPermissionsTest::setUp()
Same name in other branches
- 8.9.x core/modules/user/tests/src/Functional/UserPermissionsTest.php \Drupal\Tests\user\Functional\UserPermissionsTest::setUp()
- 10 core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php \Drupal\Tests\user\FunctionalJavascript\UserPermissionsTest::setUp()
- 10 core/modules/user/tests/src/Functional/UserPermissionsTest.php \Drupal\Tests\user\Functional\UserPermissionsTest::setUp()
- 11.x core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php \Drupal\Tests\user\FunctionalJavascript\UserPermissionsTest::setUp()
- 11.x core/modules/user/tests/src/Functional/UserPermissionsTest.php \Drupal\Tests\user\Functional\UserPermissionsTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ user/ tests/ src/ FunctionalJavascript/ UserPermissionsTest.php, line 37
Class
- UserPermissionsTest
- Tests the JS components added to the user permissions page.
Namespace
Drupal\Tests\user\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$this->adminUser = $this->drupalCreateUser([
'administer permissions',
]);
// Find the new role ID.
$all_rids = $this->adminUser
->getRoles();
unset($all_rids[array_search(RoleInterface::AUTHENTICATED_ID, $all_rids)]);
$this->rid = reset($all_rids);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.