Add full body assertion

This commit is contained in:
Philipp Lang 2023-11-29 23:00:47 +01:00
parent 5a5f1756e1
commit 8654d13e81
1 changed files with 12 additions and 3 deletions

View File

@ -30,6 +30,15 @@ trait FakesCompilation
Assert::assertNotEmpty($validDocuments, 'Failed that TeX Document "' . $documentClass . '" has been compiled with given check.');
}
/**
* @param class-string<Document> $documentClass
* @param callable(Document): bool $check
*/
public function assertCompiledContent(string $documentClass, string $content): void
{
$this->assertCompiled($documentClass, fn ($document) => $document->renderBody() === $content);
}
/**
* @param class-string<Document> $documentClass
*/