The Laravel team released 5.7.22 yesterday with miscellaneous fixes and changes.
A fix was added for the
TestResponse::assertJsonValidationErrors() when there are no errors. Previously, this assertion would throw an ErrorException if no
errors key were present in the response.
TestResponse::assertJsonMissingValidationErrors() method is allowed to be called without an argument:
$this->post(route('api.users.store'), $data) ->assertJsonMissingValidationErrors() ->assertStatus(201);
If the test has validation errors in this case, they are now printed to the console with a helpful error message.
Next, the Vue frontend preset stubs got Laravel Mix v4 comparability updates.
Along with the Vue preset, the React preset was updated to use the
@babel/preset-react package which is a required dependency.
The last change is using
config to resolve the database value during tests.
TestResponse::assertJsonValidationErrors()when there are no errors (#27190)
TestResponse::assertJsonMissingValidationErrors()to be called without an argument (#27176)
- Updated Vue preset’s vue-stubs for laravel-mix 4 compatibility (#27229)
- Updated preset to use
configto resolve the database value during tests. (#27240)
Join the weekly newsletter and never miss out on new tips, tutorials, and more.
- PHP Web Developer
Christ for all Nations
- PHP Developer
Manhattan, KS (open to Remote)
- Mid-Senior Laravel Developer
- Full Stack Web Developer
Las Vegas, NV
- Staff Software Engineer (Laravel)
- Software Engineer (PHP, Laravel, Vue)
Los Angeles, CA
- Software Engineer Level 1 / Level 2
St. Pete. / Tampa Area, FL / Remote