Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
37
vendor/doctrine/rst-parser/tests/BuilderReferences/BuilderReferencesTest.php
vendored
Normal file
37
vendor/doctrine/rst-parser/tests/BuilderReferences/BuilderReferencesTest.php
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\Tests\RST\BuilderReferences;
|
||||
|
||||
use Doctrine\RST\Builder;
|
||||
use Doctrine\Tests\RST\BaseBuilderTest;
|
||||
use Gajus\Dindent\Indenter;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
use function rtrim;
|
||||
|
||||
class BuilderReferencesTest extends BaseBuilderTest
|
||||
{
|
||||
protected function configureBuilder(Builder $builder): void
|
||||
{
|
||||
$builder->getConfiguration()->abortOnError(false);
|
||||
$builder->getConfiguration()->silentOnError();
|
||||
}
|
||||
|
||||
public function test(): void
|
||||
{
|
||||
$indenter = new Indenter();
|
||||
|
||||
foreach (Finder::create()->files()->in($this->targetFile() . '/../expected') as $file) {
|
||||
$target = $this->targetFile($file->getRelativePathname());
|
||||
self::assertFileExists($target);
|
||||
self::assertEquals(rtrim($file->getContents()), rtrim($indenter->indent($this->getFileContents($target))));
|
||||
}
|
||||
}
|
||||
|
||||
protected function getFixturesDirectory(): string
|
||||
{
|
||||
return 'BuilderReferences';
|
||||
}
|
||||
}
|
21
vendor/doctrine/rst-parser/tests/BuilderReferences/expected/index.html
vendored
Normal file
21
vendor/doctrine/rst-parser/tests/BuilderReferences/expected/index.html
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="section" id="references">
|
||||
<h1>
|
||||
References
|
||||
</h1>
|
||||
<p>Test <a href="reference.html">referencing a document</a></p>
|
||||
<p>Test <a href="reference.html#test_anchor">referencing an anchor in another document</a></p>
|
||||
<p>Test referencing a <a href="index.html#sub-section">Sub section</a> and Some Sub Section (invalid)</p>
|
||||
<div class="section" id="sub-section">
|
||||
<h2>
|
||||
Sub section
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
31
vendor/doctrine/rst-parser/tests/BuilderReferences/expected/reference/page.html
vendored
Normal file
31
vendor/doctrine/rst-parser/tests/BuilderReferences/expected/reference/page.html
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="section" id="reference-page">
|
||||
<h1>
|
||||
Reference Page
|
||||
</h1>
|
||||
<ul>
|
||||
<li><a href="page.html#some-sub-section">Some Sub Section</a></li>
|
||||
<li><a href="page.html#other">Other Sub Section</a></li>
|
||||
<li><a href="page1.html#another-page">Section on another subpage</a></li>
|
||||
</ul>
|
||||
<p>And what about <a href="../reference.html#test_anchor">the test anchor</a>?</p>
|
||||
<div class="section" id="some-sub-section">
|
||||
<h2>
|
||||
Some Sub Section
|
||||
</h2>
|
||||
<a id="other"></a>
|
||||
|
||||
</div>
|
||||
<div class="section" id="other-sub-section">
|
||||
<h2>
|
||||
Other Sub Section
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
11
vendor/doctrine/rst-parser/tests/BuilderReferences/input/index.rst
vendored
Normal file
11
vendor/doctrine/rst-parser/tests/BuilderReferences/input/index.rst
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
References
|
||||
==========
|
||||
|
||||
Test :ref:`referencing a document <reference>`
|
||||
|
||||
Test :ref:`referencing an anchor in another document <test_anchor>`
|
||||
|
||||
Test referencing a `Sub section`_ and `Some Sub Section`_ (invalid)
|
||||
|
||||
Sub section
|
||||
-----------
|
6
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference.rst
vendored
Normal file
6
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference.rst
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
.. _test_anchor:
|
||||
|
||||
Reference
|
||||
=========
|
||||
|
||||
Test
|
16
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference/page.rst
vendored
Normal file
16
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference/page.rst
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
Reference Page
|
||||
==============
|
||||
|
||||
* `Some Sub Section`_
|
||||
* :ref:`Other Sub Section <other>`
|
||||
* :ref:`Section on another subpage <another-page>`
|
||||
|
||||
And what about :ref:`the test anchor <test_anchor>`?
|
||||
|
||||
Some Sub Section
|
||||
----------------
|
||||
|
||||
.. _other:
|
||||
|
||||
Other Sub Section
|
||||
-----------------
|
7
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference/page1.rst
vendored
Normal file
7
vendor/doctrine/rst-parser/tests/BuilderReferences/input/reference/page1.rst
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
Reference Page 1
|
||||
================
|
||||
|
||||
.. _another-page:
|
||||
|
||||
Section on Another Page
|
||||
-----------------------
|
Loading…
Add table
Add a link
Reference in a new issue