Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:7.xfrom
claudiodekker:7.x
Jul 17, 2020
Merged

[7.x] Align (fix) nested arrays support for assertViewHas & assertViewMissing#33566
taylorotwell merged 2 commits into
laravel:7.xfrom
claudiodekker:7.x

Conversation

@claudiodekker
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <claudiodekker@users.noreply.github.com>
@driesvints
Copy link
Copy Markdown
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