@@ -51,7 +51,7 @@ public function testValidateRejectsUnknownFieldsAndRuleViolations(): void
5151 'unknown ' => 'boom ' ,
5252 ]);
5353
54- $ result = $ dto ->validate ();
54+ $ result = $ dto ->checkValidations ();
5555 $ this ->assertFalse ($ result ->isValid ());
5656 $ codes = array_column ($ result ->getErrors (), 'code ' );
5757 $ this ->assertContains ('unknown_field ' , $ codes );
@@ -69,7 +69,7 @@ public function testValidateAppliesDefaultsAndAcceptsValidPayload(): void
6969 'status ' => 'active ' ,
7070 ]);
7171
72- $ result = $ dto ->validate ();
72+ $ result = $ dto ->checkValidations ();
7373 $ this ->assertTrue ($ result ->isValid ());
7474 $ this ->assertSame ('guest ' , $ dto ->role );
7575 $ this ->assertNull ($ dto ->comment );
@@ -85,7 +85,7 @@ public function testCsrfProtectedDtoValidatesTokenAndRejectsReplay(): void
8585 '_csrf ' => $ tokens ['token ' ],
8686 '_csrf_key ' => $ tokens ['key ' ],
8787 ]);
88- $ first = $ dto ->validate ();
88+ $ first = $ dto ->checkValidations ();
8989 $ this ->assertTrue ($ first ->isValid ());
9090
9191 $ dtoReplay = new DemoCsrfDto (false );
@@ -94,7 +94,7 @@ public function testCsrfProtectedDtoValidatesTokenAndRejectsReplay(): void
9494 '_csrf ' => $ tokens ['token ' ],
9595 '_csrf_key ' => $ tokens ['key ' ],
9696 ]);
97- $ replay = $ dtoReplay ->validate ();
97+ $ replay = $ dtoReplay ->checkValidations ();
9898 $ this ->assertFalse ($ replay ->isValid ());
9999 $ this ->assertContains ('invalid_csrf ' , array_column ($ replay ->getErrors (), 'code ' ));
100100 }
0 commit comments