diff --git a/src/Standing/StandingGrant.php b/src/Standing/StandingGrant.php index 6eebc37..dab0942 100644 --- a/src/Standing/StandingGrant.php +++ b/src/Standing/StandingGrant.php @@ -290,7 +290,7 @@ public static function fromArray(array $data): self $expires = $data['expires_at'] ?? null; $expiresAt = \is_string($expires) ? date_create_immutable($expires) : null; if ($expires !== null && !$expiresAt instanceof \DateTimeImmutable) { - throw new \InvalidArgumentException("{$where} gives «expires_at» as a date and time, e.g. 2026-12-31T00:00:00Z"); + throw new \InvalidArgumentException("{$where} gives «expires_at» as a date and time with its offset, in ISO 8601"); } $supersedes = $data['supersedes'] ?? null; diff --git a/tests/Standing/AStandingGrantNeverCrossesItsFloorsTest.php b/tests/Standing/AStandingGrantNeverCrossesItsFloorsTest.php index c1c052d..f20ee48 100644 --- a/tests/Standing/AStandingGrantNeverCrossesItsFloorsTest.php +++ b/tests/Standing/AStandingGrantNeverCrossesItsFloorsTest.php @@ -100,8 +100,8 @@ public static function documentsThatAreRefused(): iterable ['name' => 'c', 'statement' => 't', 'by' => ['operation' => 'lab:build']], ]], 'each under its own name']; yield 'conditions not given as a list' => [['conditions' => ['c' => ['name' => 'c']]], 'gives «conditions» as a list']; - yield 'an expiry that is not a date' => [['expires_at' => 'next week, maybe'], 'gives «expires_at» as a date and time']; - yield 'an expiry that is not text' => [['expires_at' => 1790000000], 'gives «expires_at» as a date and time']; + yield 'an expiry that is not a date' => [['expires_at' => 'next week, maybe'], 'gives «expires_at» as a date and time with its offset, in ISO 8601']; + yield 'an expiry that is not text' => [['expires_at' => 1790000000], 'gives «expires_at» as a date and time with its offset, in ISO 8601']; } public function testTheValuesRefuseTheSameThingsWhenBuiltByHand(): void