Update website

This commit is contained in:
Guilhem Lavaux 2024-11-19 08:02:04 +01:00
parent 4413528994
commit 1d90fbf296
6865 changed files with 1091082 additions and 0 deletions

View file

@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
namespace Doctrine\Tests\RST\LiteralNestedInDirective;
use Doctrine\RST\Builder;
use Doctrine\RST\Configuration;
use Doctrine\RST\Kernel;
use Doctrine\Tests\RST\BaseBuilderTest;
use function shell_exec;
/**
* Unit testing for RST
*/
class BuilderTest extends BaseBuilderTest
{
protected function setUp(): void
{
shell_exec('rm -rf ' . $this->targetFile());
$kernel = new Kernel(
new Configuration(),
[new TipDirective()]
);
$this->builder = new Builder($kernel);
$this->builder->getConfiguration()->setUseCachedMetas(false);
$this->builder->build($this->sourceFile(), $this->targetFile());
}
public function testLiteralNestedInDirective(): void
{
$contents = $this->getFileContents($this->targetFile('index.html'));
self::assertStringContainsString('class="tip"', $contents);
self::assertStringContainsString('<code', $contents);
self::assertStringContainsString('</code>', $contents);
}
protected function getFixturesDirectory(): string
{
return 'LiteralNestedInDirective';
}
}