]> BookStack Code Mirror - bookstack/blobdiff - tests/Helpers/UserRoleProvider.php
Added additional entity_role_permission scenario tests
[bookstack] / tests / Helpers / UserRoleProvider.php
index db69a6ac0bf0dd9e8030af524c255c5ea3f6918f..a85bd06cf43e5c732a5346e43ba4eef1793762f3 100644 (file)
@@ -59,7 +59,7 @@ class UserRoleProvider
     public function newUserWithRole(array $userAttrs = [], array $rolePermissions = []): array
     {
         $user = User::factory()->create($userAttrs);
-        $role = $this->attachRole($user, $rolePermissions);
+        $role = $this->attachNewRole($user, $rolePermissions);
 
         return [$user, $role];
     }
@@ -68,7 +68,7 @@ class UserRoleProvider
      * Attach a new role, with the given role permissions, to the given user
      * and return that role.
      */
-    public function attachRole(User $user, array $rolePermissions = []): Role
+    public function attachNewRole(User $user, array $rolePermissions = []): Role
     {
         $role = $this->createRole($rolePermissions);
         $user->attachRole($role);