value)->toBe($value); }); }); describe('Nonce validation rules', function () { it('throw and error with an invalid uuid', function () { // GIVEN $value = new class () implements UuidInterface { #[\Override] public function toString(): string { return 'invalid-uuid'; } #[\Override] public function compareTo(UuidInterface $other): int { throw new \Exception('Not implemented'); } #[\Override] public function equals(?object $other): bool { throw new \Exception('Not implemented'); } #[\Override] public function getBytes(): string { throw new \Exception('Not implemented'); } #[\Override] public function getFields(): FieldsInterface { throw new \Exception('Not implemented'); } #[\Override] public function getHex(): Hexadecimal { throw new \Exception('Not implemented'); } #[\Override] public function getInteger(): Integer { throw new \Exception('Not implemented'); } #[\Override] public function getUrn(): string { throw new \Exception('Not implemented'); } #[\Override] public function __toString(): string { throw new \Exception('Not implemented'); } #[\Override] public function getNumberConverter(): NumberConverterInterface { throw new \Exception('Not implemented'); } #[\Override] public function getFieldsHex(): array { throw new \Exception('Not implemented'); } #[\Override] public function getClockSeqHiAndReservedHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getClockSeqLowHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getClockSequenceHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getDateTime(): \DateTimeInterface { throw new \Exception('Not implemented'); } #[\Override] public function getLeastSignificantBitsHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getMostSignificantBitsHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getNodeHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getTimeHiAndVersionHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getTimeLowHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getTimeMidHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getTimestampHex(): string { throw new \Exception('Not implemented'); } #[\Override] public function getVariant(): ?int { throw new \Exception('Not implemented'); } #[\Override] public function getVersion(): ?int { throw new \Exception('Not implemented'); } #[\Override] public function jsonSerialize(): mixed { throw new \Exception('Not implemented'); } #[\Override] public function serialize() { throw new \Exception('Not implemented'); } public function __serialize() { throw new \Exception('Not implemented'); } #[\Override] public function unserialize(string $data) { throw new \Exception('Not implemented'); } public function __unserialize(array $data) { throw new \Exception('Not implemented'); } }; // WHEN expect(function () use ($value) { new Nonce($value); // THEN })->toThrow(\InvalidArgumentException::class); }); });