$this->assertNotNull($account->id(),SafeMarkup::format('User created with name %name and pass %pass',array('%name'=>$edit['name'],'%pass'=>$edit['pass'])));
if(!$account->id()){
returnFALSE;
}
// Add the raw password so that we can log in as this user.
$account->passRaw=$edit['pass'];
return$account;
}
/**
* Creates a role with specified permissions.
*
* @param array $permissions
* Array of permission names to assign to role.
* @param string $rid
* (optional) The role ID (machine name). Defaults to a random name.
* @param string $name
* (optional) The label for the role. Defaults to a random string.
* @param int $weight
* (optional) The weight for the role. Defaults NULL so that entity_create()
* sets the weight to maximum + 1.
*
* @return string
* Role ID of newly created role, or FALSE if role creation failed.