@@ -196,7 +196,7 @@ public function testSerializeForResponseRejectsInvalidJson(): void {
196196 $ value ->setUpdatedAt (new \DateTime ());
197197
198198 $ this ->expectException (InvalidArgumentException::class);
199- $ this ->expectExceptionMessage ('value_json could not be decoded ' );
199+ $ this ->expectExceptionMessage ('The stored value payload could not be decoded from JSON. ' );
200200
201201 $ this ->service ->serializeForResponse ($ value );
202202 }
@@ -251,7 +251,7 @@ public function testUpdateVisibilityRejectsMissingValue(): void {
251251 ->willReturn (null );
252252
253253 $ this ->expectException (InvalidArgumentException::class);
254- $ this ->expectExceptionMessage ('field value not found ' );
254+ $ this ->expectExceptionMessage ('No profile field value was found. ' );
255255
256256 $ this ->service ->updateVisibility ($ definition , 'alice ' , 'admin ' , 'users ' );
257257 }
@@ -372,7 +372,7 @@ public function testNormalizeSelectValueRejectsArray(): void {
372372 $ definition = $ this ->buildSelectDefinition (['CLT ' , 'PJ ' ]);
373373
374374 $ this ->expectException (InvalidArgumentException::class);
375- $ this ->expectExceptionMessage ('select fields expect a string value ' );
375+ $ this ->expectExceptionMessage ('Select fields require one of the configured option values. ' );
376376
377377 $ this ->service ->normalizeValue ($ definition , ['CLT ' ]);
378378 }
@@ -381,7 +381,7 @@ public function testNormalizeSelectValueRejectsInteger(): void {
381381 $ definition = $ this ->buildSelectDefinition (['1 ' , '2 ' ]);
382382
383383 $ this ->expectException (InvalidArgumentException::class);
384- $ this ->expectExceptionMessage ('select fields expect a string value ' );
384+ $ this ->expectExceptionMessage ('Select fields require one of the configured option values. ' );
385385
386386 $ this ->service ->normalizeValue ($ definition , 1 );
387387 }
@@ -390,7 +390,7 @@ public function testNormalizeSelectValueRejectsFloat(): void {
390390 $ definition = $ this ->buildSelectDefinition (['1.5 ' , '2.5 ' ]);
391391
392392 $ this ->expectException (InvalidArgumentException::class);
393- $ this ->expectExceptionMessage ('select fields expect a string value ' );
393+ $ this ->expectExceptionMessage ('Select fields require one of the configured option values. ' );
394394
395395 $ this ->service ->normalizeValue ($ definition , 1.5 );
396396 }
0 commit comments