create(); expect($backupSet->item_count)->toBe(0) ->and($backupSet->items()->count())->toBe(0); }); it('can opt into a fuller backup graph with explicit items', function (): void { $backupSet = BackupSet::factory()->full()->create(); expect($backupSet->item_count)->toBe(1) ->and($backupSet->items()->count())->toBe(1); }); it('keeps stale and degraded backup item graphs behind explicit named states', function (): void { $stale = BackupSet::factory()->staleCompleted()->create(); $degraded = BackupSet::factory()->degradedCompleted()->create(); expect($stale->items()->count())->toBe(1) ->and($degraded->items()->count())->toBe(1); });