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,44 @@
<?php
declare(strict_types=1);
namespace Doctrine\Tests\RST\BuilderToctree;
use Doctrine\Tests\RST\BaseBuilderTest;
use function file_exists;
class BuilderTocTreeTest extends BaseBuilderTest
{
public function testTocTreeGlob(): void
{
self::assertTrue(file_exists($this->targetFile('subdir/toctree.html')));
self::assertTrue(file_exists($this->targetFile('orphaned/file.html')));
self::assertTrue(file_exists($this->targetFile('wildcards/bugfix1.html')));
self::assertTrue(file_exists($this->targetFile('wildcards/feature1.html')));
self::assertTrue(file_exists($this->targetFile('wildcards/feature2.html')));
self::assertTrue(file_exists($this->targetFile('wildcards/index.html')));
}
public function testMaxDepth(): void
{
$contents = $this->getFileContents($this->targetFile('index.html'));
// :maxdepth: 1
self::assertStringContainsString('<div class="toc"><ul><li id="index-html-title" class="toc-item"><a href="index.html#title">Title</a></li></ul></div>', $contents);
// :maxdepth: 2
self::assertStringContainsString('<div class="toc"><ul><li id="index-html-title" class="toc-item"><a href="index.html#title">Title</a><ul><li id="index-html-max-depth-level-2" class="toc-item"><a href="index.html#max-depth-level-2">Max Depth Level 2</a></li></ul></li></ul></div>', $contents);
// :maxdepth: 3
self::assertStringContainsString('<div class="toc"><ul><li id="index-html-title" class="toc-item"><a href="index.html#title">Title</a><ul><li id="index-html-max-depth-level-2" class="toc-item"><a href="index.html#max-depth-level-2">Max Depth Level 2</a><ul><li id="index-html-max-depth-level-3" class="toc-item"><a href="index.html#max-depth-level-3">Max Depth Level 3</a></li></ul></li></ul></li></ul></div>', $contents);
// :maxdepth: 4
self::assertStringContainsString('<div class="toc"><ul><li id="index-html-title" class="toc-item"><a href="index.html#title">Title</a><ul><li id="index-html-max-depth-level-2" class="toc-item"><a href="index.html#max-depth-level-2">Max Depth Level 2</a><ul><li id="index-html-max-depth-level-3" class="toc-item"><a href="index.html#max-depth-level-3">Max Depth Level 3</a><ul><li id="index-html-max-depth-level-4" class="toc-item"><a href="index.html#max-depth-level-4">Max Depth Level 4</a></li></ul></li></ul></li></ul></li></ul></div>', $contents);
}
protected function getFixturesDirectory(): string
{
return 'BuilderToctree';
}
}

View file

@ -0,0 +1,43 @@
Title
=====
.. toctree::
subdir/toctree
Max Depth Level 2
---------
Max Depth Level 3
~~~~~~~
Max Depth Level 4
+++++++++++++++++
maxdepth 1 TOC:
.. toctree::
:depth: 1
index
maxdepth 2 TOC:
.. toctree::
:maxdepth: 2
index
maxdepth 3 TOC:
.. toctree::
:maxdepth: 3
index
maxdepth 4 TOC:
.. toctree::
:maxdepth: 4
index

View file

@ -0,0 +1,3 @@
This file should not be parsed
==============================

View file

@ -0,0 +1,13 @@
Toctree
=======
.. toctree::
:glob:
*
.. toctree::
:glob:
/subdir/*

View file

@ -0,0 +1,4 @@
Feature 3
=========
Lorem Ispusm dolor

View file

@ -0,0 +1,4 @@
Feature 1
=========
Lorem Ispusm dolor

View file

@ -0,0 +1,4 @@
Feature 2
=========
Lorem Ispusm dolor

View file

@ -0,0 +1,19 @@
Wildcards
=========
Features
========
.. toctree::
:glob:
feature*
Bugfixes
========
.. toctree::
:glob:
bugfix*