function UserPermissionsTestCase::setUp
Overrides DrupalWebTestCase::setUp
File
-
modules/
user/ user.test, line 1620
Class
Code
function setUp() {
parent::setUp();
$this->admin_user = $this->drupalCreateUser(array(
'administer permissions',
'access user profiles',
'administer site configuration',
'administer modules',
'administer users',
));
// Find the new role ID - it must be the maximum.
$all_rids = array_keys($this->admin_user->roles);
sort($all_rids);
$this->rid = array_pop($all_rids);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.