gl-website-deployer/vendor/doctrine/rst-parser/tests/HTML/IndentHTMLTest.php

42 lines
792 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
declare(strict_types=1);
namespace Doctrine\Tests\RST\HTML;
use Doctrine\RST\Configuration;
use Doctrine\RST\Kernel;
use Doctrine\RST\Parser;
use PHPUnit\Framework\TestCase;
class IndentHTMLTest extends TestCase
{
public function testIndentHTML(): void
{
$configuration = new Configuration();
$configuration->setIndentHTML(true);
$kernel = new Kernel($configuration);
$parser = new Parser($kernel);
$document = $parser->parse('Test paragraph.');
$rendered = $document->renderDocument();
$expected = <<<'HTML'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<p>Test paragraph.</p>
</body>
</html>
HTML;
self::assertSame($expected, $rendered);
}
}