You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Now that we got an automatic way to get 422 response code when a form is invalid (see #40799), I think it could be nice to ease testing it.
I'm proposing to add a new method to BrowserKitAssertionsTrait:
Instead of calling self::assertResponseStatusCodeSame(422) or self::assertResponseStatusCodeSame(Response::HTTP_UNPROCESSABLE_ENTITY) each time that you want to test for a submitted invali form, you could simply call self::assertResponseIsUnprocessable()
The text was updated successfully, but these errors were encountered:
Description
Now that we got an automatic way to get 422 response code when a form is invalid (see #40799), I think it could be nice to ease testing it.
I'm proposing to add a new method to
BrowserKitAssertionsTrait
:with relative constraint
Example
Instead of calling
self::assertResponseStatusCodeSame(422)
orself::assertResponseStatusCodeSame(Response::HTTP_UNPROCESSABLE_ENTITY)
each time that you want to test for a submitted invali form, you could simply callself::assertResponseIsUnprocessable()
The text was updated successfully, but these errors were encountered: