Skip to content

Commit bd3161d

Browse files
[10.x] Add assertViewEmpty to TestView (#49558)
* Add assertEmpty to TestView * Update TestView.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 551569e commit bd3161d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Illuminate/Testing/TestView.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ public function assertViewMissing($key)
106106
return $this;
107107
}
108108

109+
/**
110+
* Assert that the view's rendered content is empty.
111+
*/
112+
public function assertViewEmpty()
113+
{
114+
PHPUnit::assertEmpty($this->rendered);
115+
116+
return true;
117+
}
118+
109119
/**
110120
* Assert that the given string is contained within the view.
111121
*

0 commit comments

Comments
 (0)