shouldProcess())->toBeTrue(); }); it('identifies COMPLETED should not be processed', function () { expect(RegistrationStatus::COMPLETED->shouldProcess())->toBeFalse(); }); it('identifies FAILED should not be processed', function () { expect(RegistrationStatus::FAILED->shouldProcess())->toBeFalse(); }); it('identifies REVOKED should not be processed', function () { expect(RegistrationStatus::REVOKED->shouldProcess())->toBeFalse(); }); }); describe('final status checks', function () { it('identifies COMPLETED as final', function () { expect(RegistrationStatus::COMPLETED->isFinal())->toBeTrue(); }); it('identifies REVOKED as final', function () { expect(RegistrationStatus::REVOKED->isFinal())->toBeTrue(); }); it('identifies PENDING as not final', function () { expect(RegistrationStatus::PENDING->isFinal())->toBeFalse(); }); it('identifies FAILED as not final', function () { expect(RegistrationStatus::FAILED->isFinal())->toBeFalse(); }); }); describe('retry capability', function () { it('allows retry for FAILED status', function () { expect(RegistrationStatus::FAILED->canRetry())->toBeTrue(); }); it('disallows retry for PENDING status', function () { expect(RegistrationStatus::PENDING->canRetry())->toBeFalse(); }); it('disallows retry for COMPLETED status', function () { expect(RegistrationStatus::COMPLETED->canRetry())->toBeFalse(); }); it('disallows retry for REVOKED status', function () { expect(RegistrationStatus::REVOKED->canRetry())->toBeFalse(); }); }); describe('badge colors', function () { it('returns yellow for PENDING', function () { $color = RegistrationStatus::PENDING->getBadgeColor(); expect(str_contains($color, 'yellow'))->toBeTrue(); }); it('returns green for COMPLETED', function () { $color = RegistrationStatus::COMPLETED->getBadgeColor(); expect(str_contains($color, 'green'))->toBeTrue(); }); it('returns red for FAILED', function () { $color = RegistrationStatus::FAILED->getBadgeColor(); expect(str_contains($color, 'red'))->toBeTrue(); }); it('returns gray for REVOKED', function () { $color = RegistrationStatus::REVOKED->getBadgeColor(); expect(str_contains($color, 'gray'))->toBeTrue(); }); }); describe('display labels', function () { it('returns correct label for PENDING', function () { $label = RegistrationStatus::PENDING->getLabel(); expect(str_contains($label, 'Pending'))->toBeTrue(); }); it('returns correct label for COMPLETED', function () { $label = RegistrationStatus::COMPLETED->getLabel(); expect(str_contains($label, 'Completed'))->toBeTrue(); }); it('returns correct label for FAILED', function () { $label = RegistrationStatus::FAILED->getLabel(); expect(str_contains($label, 'Failed'))->toBeTrue(); }); it('returns correct label for REVOKED', function () { $label = RegistrationStatus::REVOKED->getLabel(); expect(str_contains($label, 'Revoked'))->toBeTrue(); }); }); });