Commit 08f4fc42 authored by alexpott's avatar alexpott

Issue #2723639 by pbuyle, valthebald: Remove entity_load* usage for user_role entity type

parent 56e416cc
......@@ -732,7 +732,7 @@ protected function drupalCreateRole(array $permissions, $rid = NULL, $name = NUL
// Grant the specified permissions to the role, if any.
if (!empty($permissions)) {
user_role_grant_permissions($role->id(), $permissions);
$assigned_permissions = entity_load('user_role', $role->id())->getPermissions();
$assigned_permissions = Role::load($role->id())->getPermissions();
$missing_permissions = array_diff($permissions, $assigned_permissions);
if ($missing_permissions) {
$this->fail(SafeMarkup::format('Failed to create permissions: @perms', array('@perms' => implode(', ', $missing_permissions))));
......
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