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
This PR was squashed before being merged into the 5.4 branch.
Discussion
----------
[FrameworkBundle] Add BrowserKitAssertionsTrait::assertThatForBrowser
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I wanted to create a constraint that acts on the request and the response (an openapi schema validator constraint that needs the method and pathinfo from the request and the body from the response). But, there is currently no way to get the current client, since `BrowserKitAssertionsTrait::getClient` is private and there is no method to do an assertion on the client/browser (like `BrowserKitAssertionsTrait::assertThatForResponse` for the response).
This small change will allow to do the following:
```
protected static function assertResponseMatchesOpenApiSchema(): void
{
self::assertThatForBrowser(new ResponseMatchesOpenApiSchema(self::getOpenApiValidator()));
}
```
Commits
-------
b2c32ea9fd [FrameworkBundle] Add BrowserKitAssertionsTrait::assertThatForBrowser
0 commit comments