Skip to content

[5.8] Fix assertJsonValidationErrors with muliple messages - #29380

Merged
taylorotwell merged 4 commits into
laravel:5.8from
MoonHyuk:5.8
Aug 2, 2019
Merged

[5.8] Fix assertJsonValidationErrors with muliple messages#29380
taylorotwell merged 4 commits into
laravel:5.8from
MoonHyuk:5.8

Conversation

@MoonHyuk

@MoonHyuk MoonHyuk commented Aug 2, 2019

Copy link
Copy Markdown
Contributor

assertJsonValidationErrors only tests first message of given array.

for example,

$this->assertJsonValidationErrors([
    'body' => 'required',
    'receiver' => 'required'
]);

This test seems to work well, but the test below passes too.

$this->assertJsonValidationErrors([
    'body' => 'required',
    'receiver' => 'requiredddddd'
]);

And it's wierd because there is no error message like 'requiredddddd'

Comment thread src/Illuminate/Foundation/Testing/TestResponse.php
Comment thread src/Illuminate/Foundation/Testing/TestResponse.php
Co-Authored-By: Dries Vints <dries.vints@gmail.com>
@driesvints
driesvints dismissed their stale review August 2, 2019 08:31

Changes made

@taylorotwell
taylorotwell merged commit 4d3f770 into laravel:5.8 Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants