diff --git a/tests/Feature/Aura/CreateResourcePermissionsCommandTest.php b/tests/Feature/Aura/CreateResourcePermissionsCommandTest.php index dba23baf..f8b9bed4 100644 --- a/tests/Feature/Aura/CreateResourcePermissionsCommandTest.php +++ b/tests/Feature/Aura/CreateResourcePermissionsCommandTest.php @@ -40,7 +40,7 @@ 'restore' => 'Restore', 'delete' => 'Delete', 'forceDelete' => 'Force Delete', - 'scope' => 'Scope' + 'scope' => 'Scope', ]; foreach ($permissionTypes as $type => $displayName) { @@ -50,7 +50,7 @@ ])->first(); expect($permission)->not->toBeNull() - ->and($permission->name)->toBe($displayName . ' ' . $r->pluralName()) + ->and($permission->name)->toBe($displayName.' '.$r->pluralName()) ->and($permission->group)->toBe($r->pluralName()); } } @@ -63,27 +63,27 @@ // Create a permission manually first $resource = app(User::class); Permission::create([ - 'name' => 'View ' . $resource->pluralName(), - 'slug' => 'view-' . $resource::$slug, + 'name' => 'View '.$resource->pluralName(), + 'slug' => 'view-'.$resource::$slug, 'group' => $resource->pluralName(), ]); // Get initial count - $initialCount = Permission::where('slug', 'view-' . $resource::$slug)->count(); + $initialCount = Permission::where('slug', 'view-'.$resource::$slug)->count(); expect($initialCount)->toBe(1); // Run the command $this->artisan('aura:create-resource-permissions')->assertSuccessful(); // Verify no duplicates were created - $finalCount = Permission::where('slug', 'view-' . $resource::$slug)->count(); + $finalCount = Permission::where('slug', 'view-'.$resource::$slug)->count(); expect($finalCount)->toBe(1); }); test('it authenticates as user ID 1', function () { // Create a user for authentication $user = User::factory()->create(['id' => 1]); - + // Run the command $this->artisan('aura:create-resource-permissions')->assertSuccessful(); @@ -100,11 +100,11 @@ // Test specific permission naming $resource = app(User::class); - $permission = Permission::where('slug', 'view-' . $resource::$slug)->first(); + $permission = Permission::where('slug', 'view-'.$resource::$slug)->first(); expect($permission) - ->name->toBe('View ' . $resource->pluralName()) - ->slug->toBe('view-' . $resource::$slug) + ->name->toBe('View '.$resource->pluralName()) + ->slug->toBe('view-'.$resource::$slug) ->group->toBe($resource->pluralName()); }); diff --git a/tests/Feature/Aura/DatabaseToResourcesCommandTest.php b/tests/Feature/Aura/DatabaseToResourcesCommandTest.php index 7a6ceb28..e200d603 100644 --- a/tests/Feature/Aura/DatabaseToResourcesCommandTest.php +++ b/tests/Feature/Aura/DatabaseToResourcesCommandTest.php @@ -1,8 +1,7 @@