2022-10-26 16:13:19 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zoomyboy\Tex;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\Assert;
|
|
|
|
|
|
|
|
abstract class Document
|
|
|
|
{
|
2022-10-27 02:26:32 +02:00
|
|
|
abstract public function filename(): string;
|
|
|
|
|
|
|
|
abstract public function view(): string;
|
|
|
|
|
|
|
|
abstract public function template(): ?string;
|
|
|
|
|
|
|
|
abstract public function getEngine(): string;
|
|
|
|
|
2022-10-26 16:13:19 +02:00
|
|
|
public function assertHasContent(string $content): void
|
|
|
|
{
|
|
|
|
Assert::assertStringContainsString(
|
|
|
|
$content,
|
|
|
|
$this->renderBody(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function renderBody(): string
|
|
|
|
{
|
|
|
|
return 'gggggMax';
|
|
|
|
}
|
|
|
|
}
|