Skip to content

Commit

Permalink
[10.x] Add assertViewEmpty to TestView (#49558)
Browse files Browse the repository at this point in the history
* Add assertEmpty to TestView

* Update TestView.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
dwightwatson and taylorotwell authored Jan 3, 2024
1 parent 551569e commit bd3161d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Testing/TestView.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ public function assertViewMissing($key)
return $this;
}

/**
* Assert that the view's rendered content is empty.
*/
public function assertViewEmpty()
{
PHPUnit::assertEmpty($this->rendered);

return true;
}

/**
* Assert that the given string is contained within the view.
*
Expand Down

0 comments on commit bd3161d

Please sign in to comment.