Skip to content

Commit

Permalink
[10.x] Add test for assertViewHasAll method (#47366)
Browse files Browse the repository at this point in the history
* add test for `assertViewHasAll` method

* fix styleci
  • Loading branch information
milwad-dev committed Jun 7, 2023
1 parent 6ba2ccb commit 3faf9ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Testing/TestResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ public function testAssertViewHasWithArray()
$response->assertViewHas(['foo' => 'bar']);
}

public function testAssertViewHasAll()
{
$response = $this->makeMockResponse([
'render' => 'hello world',
'gatherData' => ['foo' => 'bar'],
]);

$response->assertViewHasAll([
'foo' => 'bar',
]);
}

public function testAssertViewMissing()
{
$response = $this->makeMockResponse([
Expand Down

0 comments on commit 3faf9ef

Please sign in to comment.