Commit 7bf8e72a authored by Dries's avatar Dries

- Patch #340081 by dmitrig01, boombatower: clean-up of drupalCreateUser()

parent 94c3dcee
......@@ -671,9 +671,9 @@ public static function randomName($number = 4, $prefix = 'simpletest_') {
* A fully loaded user object with pass_raw property, or FALSE if account
* creation fails.
*/
protected function drupalCreateUser($permissions = NULL) {
protected function drupalCreateUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {
// Create a role with the given permission set.
if (!($rid = $this->_drupalCreateRole($permissions))) {
if (!($rid = $this->drupalCreateRole($permissions))) {
return FALSE;
}
......@@ -705,12 +705,7 @@ protected function drupalCreateUser($permissions = NULL) {
* @return
* Role ID of newly created role, or FALSE if role creation failed.
*/
protected function _drupalCreateRole(array $permissions = NULL) {
// Generate string version of permissions list.
if ($permissions === NULL) {
$permissions = array('access comments', 'access content', 'post comments', 'post comments without approval');
}
protected function drupalCreateRole(array $permissions) {
if (!$this->checkPermissions($permissions)) {
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment