create(); $otherTenant = Tenant::factory()->create(); [$user] = createUserWithTenant($tenant); $user->tenants()->syncWithoutDetaching([ $otherTenant->getKey() => ['role' => 'owner'], ]); $visibleSet = BackupSet::factory()->create([ 'tenant_id' => $tenant->getKey(), 'name' => 'visible-backup-set', ]); $hiddenSet = BackupSet::factory()->create([ 'tenant_id' => $otherTenant->getKey(), 'name' => 'hidden-backup-set', ]); bindFailHardGraphClient(); $this->actingAs($user) ->get(BackupSetResource::getUrl('index', tenant: $tenant)) ->assertOk() ->assertSee('Created by') ->assertSee($visibleSet->name) ->assertDontSee($hiddenSet->name); });