Commit 9f4c5cf
[13.x] Add flushState to FormRequest to reset global strict mode between tests (#59574)
* [13.x] Add flushState to FormRequest to reset global strict mode between tests
FormRequest::failOnUnknownFields() sets a static flag that persists
across tests. Without a flushState() method and a call in the test
lifecycle teardown, enabling strict mode in one test leaks into all
subsequent tests.
* formatting
---------
Co-authored-by: Taylor Otwell <taylor@laravel.com>1 parent a3a626b commit 9f4c5cf
2 files changed
Lines changed: 12 additions & 0 deletions
File tree
- src/Illuminate/Foundation
- Http
- Testing/Concerns
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
430 | 440 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
0 commit comments