value)->toBe($value); })->with([ 'Arcadia Test Client', 'A', str_repeat('b', 255), ]); }); describe('ClientName Value Object Validation Rules', function (): void { it('throws InvalidArgumentException when given an empty client name', function (): void { // GIVEN $invalid = ''; // WHEN $execution = fn () => new ClientName($invalid); // THEN expect($execution)->toThrow( \InvalidArgumentException::class, 'ClientName cannot be empty.' ); }); it('throws InvalidArgumentException when client name exceeds 255 characters', function (): void { // GIVEN $invalid = str_repeat('a', 256); // WHEN $execution = fn () => new ClientName($invalid); // THEN expect($execution)->toThrow( \InvalidArgumentException::class, 'ClientName cannot exceed 255 characters.' ); }); });