Skip to content

Commit 3faf9ef

Browse files
authored
[10.x] Add test for assertViewHasAll method (#47366)
* add test for `assertViewHasAll` method * fix styleci
1 parent 6ba2ccb commit 3faf9ef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Testing/TestResponseTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ public function testAssertViewHasWithArray()
198198
$response->assertViewHas(['foo' => 'bar']);
199199
}
200200

201+
public function testAssertViewHasAll()
202+
{
203+
$response = $this->makeMockResponse([
204+
'render' => 'hello world',
205+
'gatherData' => ['foo' => 'bar'],
206+
]);
207+
208+
$response->assertViewHasAll([
209+
'foo' => 'bar',
210+
]);
211+
}
212+
201213
public function testAssertViewMissing()
202214
{
203215
$response = $this->makeMockResponse([

0 commit comments

Comments
 (0)