Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
44
vendor/doctrine/rst-parser/tests/BuilderWithErrors/BuilderWithErrorsTest.php
vendored
Normal file
44
vendor/doctrine/rst-parser/tests/BuilderWithErrors/BuilderWithErrorsTest.php
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\Tests\RST\BuilderWithErrors;
|
||||
|
||||
use Doctrine\RST\Builder;
|
||||
use Doctrine\Tests\RST\BaseBuilderTest;
|
||||
use Symfony\Component\DomCrawler\Crawler;
|
||||
|
||||
use function trim;
|
||||
|
||||
class BuilderWithErrorsTest extends BaseBuilderTest
|
||||
{
|
||||
protected function configureBuilder(Builder $builder): void
|
||||
{
|
||||
$builder->getConfiguration()->abortOnError(false);
|
||||
$builder->getConfiguration()->silentOnError(true);
|
||||
}
|
||||
|
||||
public function testNoContentDirectiveError(): void
|
||||
{
|
||||
$contents = $this->getFileContents($this->targetFile('no_content_directive.html'));
|
||||
$crawler = new Crawler($contents);
|
||||
$bodyHtml = trim($crawler->filter('body')->html());
|
||||
|
||||
// the note is simply left out
|
||||
self::assertSame(<<<'EOF'
|
||||
<p>Testing wrapper node at end of file</p>
|
||||
<p>And here is more text.</p>
|
||||
EOF
|
||||
, $bodyHtml);
|
||||
|
||||
self::assertEquals(
|
||||
'Error while processing "note" directive: "Content expected, none found." in file "no_content_directive" at line 6',
|
||||
$this->builder->getErrorManager()->getErrors()[0]->asString()
|
||||
);
|
||||
}
|
||||
|
||||
protected function getFixturesDirectory(): string
|
||||
{
|
||||
return 'BuilderWithErrors';
|
||||
}
|
||||
}
|
4
vendor/doctrine/rst-parser/tests/BuilderWithErrors/input/index.rst
vendored
Normal file
4
vendor/doctrine/rst-parser/tests/BuilderWithErrors/input/index.rst
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
.. toctree::
|
||||
:glob:
|
||||
|
||||
no_content_directive
|
5
vendor/doctrine/rst-parser/tests/BuilderWithErrors/input/no_content_directive.rst
vendored
Normal file
5
vendor/doctrine/rst-parser/tests/BuilderWithErrors/input/no_content_directive.rst
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
Testing wrapper node at end of file
|
||||
|
||||
.. note::
|
||||
|
||||
And here is more text.
|
Loading…
Add table
Add a link
Reference in a new issue