Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Align (fix) nested arrays support for assertViewHas & assertViewMissing #33566

Merged
merged 2 commits into from
Jul 17, 2020
Merged

Conversation

claudiodekker
Copy link
Contributor

@claudiodekker claudiodekker commented Jul 17, 2020

This PR completes/fixes the inconsistent behaviour regarding nested array support introduced in #30837

It also re-aligns the assertViewMissing method in a similar fashion, to be compatible with the assertViewHas changes proposed in this PR.


assertViewHas

These were already possible:

$response->assertViewHas('foo');
$response->assertViewHas('foo', 'bar');
$response->assertViewHas('foo.nested', 'bar');

However, this one wasn't:

$response->assertViewHas('foo.nested');

assertViewMissing

Similarly, this was already possible:

$response->assertViewMissing('foo');

But this one wasn't:

$response->assertViewMissing('foo.nested');

@claudiodekker claudiodekker changed the title [7.x] Complete support for nested assertViewHas [7.x] Complete support for nested arrays assertViewHas Jul 17, 2020
@claudiodekker claudiodekker changed the title [7.x] Complete support for nested arrays assertViewHas [7.x] Complete support for nested arrays with assertViewHas Jul 17, 2020
@claudiodekker claudiodekker changed the title [7.x] Complete support for nested arrays with assertViewHas [7.x] Complete (fix) support for nested arrays with assertViewHas Jul 17, 2020
@claudiodekker claudiodekker changed the title [7.x] Complete (fix) support for nested arrays with assertViewHas [7.x] Align (fix) support for nested arrays with assertViewHas / assertViewMissing Jul 17, 2020
@claudiodekker claudiodekker changed the title [7.x] Align (fix) support for nested arrays with assertViewHas / assertViewMissing [7.x] Align (fix) nested arrays support for assertViewHas & assertViewMissing Jul 17, 2020
@taylorotwell taylorotwell merged commit 5bb7b2b into laravel:7.x Jul 17, 2020
@driesvints
Copy link
Member

@claudiodekker just for future references: any bug fix can be sent to 6.x instead which will get merged with upstream branches.

@claudiodekker
Copy link
Contributor Author

claudiodekker commented Jul 17, 2020

@driesvints Ah, I'll keep it in mind next time. I was looking at https://laravel.com/docs/7.x/contributions#which-branch, which told me to target the latest LTS?

Update: Oops, I only now noticed the (LTS) flag appended to 6 😅

driesvints pushed a commit that referenced this pull request Jul 17, 2020
…ViewMissing` (#33566)

* testAssertViewHasNested

* Align assertViewMissing

Co-authored-by: Claudio Dekker <[email protected]>
@driesvints
Copy link
Member

6.x is the current LTS version yes. I've backported this.

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