Add assertHasAllContent

This commit is contained in:
philipp lang 2022-12-06 21:25:16 +01:00
parent 68d4f38e31
commit f075f67526
1 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,16 @@ abstract class Document
); );
} }
/**
* @param array<int, string> $content
*/
public function assertHasAllContent(array $content): void
{
foreach ($content as $test) {
$this->assertHasContent($test);
}
}
public function hasContent(string $content): bool public function hasContent(string $content): bool
{ {
return str_contains($this->renderBody(), $content); return str_contains($this->renderBody(), $content);