Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commitfc0bc3f
committed
feature#42526 [FrameworkBundle] Add BrowserKitAssertionsTrait::assertThatForBrowser (koenreiniers)
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-------b2c32ea [FrameworkBundle] Add BrowserKitAssertionsTrait::assertThatForBrowserFile tree
1 file changed
+8
-3
lines changed- src/Symfony/Bundle/FrameworkBundle/Test
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
0 commit comments
Comments
(0)