Add full body assertion
This commit is contained in:
parent
5a5f1756e1
commit
8654d13e81
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue