Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
46
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/BuilderMalformedReferenceTest.php
vendored
Normal file
46
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/BuilderMalformedReferenceTest.php
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\Tests\RST\BuilderMalformedReference;
|
||||
|
||||
use Doctrine\RST\Builder;
|
||||
use Doctrine\RST\Configuration;
|
||||
use Doctrine\RST\Kernel;
|
||||
use Doctrine\Tests\RST\BaseBuilderTest;
|
||||
|
||||
class BuilderMalformedReferenceTest extends BaseBuilderTest
|
||||
{
|
||||
/** @var Configuration */
|
||||
private $configuration;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->configuration = new Configuration();
|
||||
$this->configuration->setUseCachedMetas(false);
|
||||
$this->configuration->abortOnError(false);
|
||||
$this->configuration->setIgnoreInvalidReferences(true);
|
||||
|
||||
$this->builder = new Builder(new Kernel($this->configuration));
|
||||
}
|
||||
|
||||
public function testMalformedReference(): void
|
||||
{
|
||||
// test that invalid references can be ignored and no exception gets thrown
|
||||
|
||||
$this->builder->build($this->sourceFile(), $this->targetFile());
|
||||
|
||||
$contents = $this->getFileContents($this->targetFile('subdir/another.html'));
|
||||
|
||||
self::assertStringContainsString('<p>Test link to</p>', $contents);
|
||||
|
||||
$contents = $this->getFileContents($this->targetFile('subdir/index.html'));
|
||||
|
||||
self::assertStringContainsString('<a id="test_reference"></a>', $contents);
|
||||
}
|
||||
|
||||
protected function getFixturesDirectory(): string
|
||||
{
|
||||
return 'BuilderMalformedReference';
|
||||
}
|
||||
}
|
1
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/index.rst
vendored
Normal file
1
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/index.rst
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Index
|
1
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/subdir/another.rst
vendored
Normal file
1
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/subdir/another.rst
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Test :doc:`link to <_test_reference>`
|
3
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/subdir/index.rst
vendored
Normal file
3
vendor/doctrine/rst-parser/tests/BuilderMalformedReference/input/subdir/index.rst
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
Example:
|
||||
|
||||
.. _test_reference:
|
Loading…
Add table
Add a link
Reference in a new issue