Skip to content

Commit 46e1c07

Browse files
committed
Failing test case for a missing line break with anchors
1 parent 9b9d026 commit 46e1c07

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

tests/IntegrationTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function integrationProvider()
8585
/**
8686
* @dataProvider parserUnitBlockProvider
8787
*/
88-
public function testParseUnitBlock(string $blockName)
88+
public function testParseUnitBlock(string $blockName, bool $useIndenter = true)
8989
{
9090
$configuration = new Configuration();
9191
$configuration->setCustomTemplateDirs([__DIR__.'/Templates']);
@@ -101,6 +101,11 @@ public function testParseUnitBlock(string $blockName)
101101
$indenter = $this->createIndenter();
102102

103103
$expectedFile = sprintf('%s/fixtures/expected/blocks/%s.html', __DIR__, $blockName);
104+
105+
if (!$useIndenter) {
106+
$this->assertSame(file_get_contents($expectedFile), $document);
107+
}
108+
104109
$this->assertSame(
105110
str_replace(" \n", "\n", $indenter->indent(file_get_contents($expectedFile))),
106111
str_replace(" \n", "\n", $indenter->indent($document))
@@ -197,6 +202,11 @@ public function parserUnitBlockProvider()
197202
'blockName' => 'references/php-method',
198203
];
199204

205+
yield 'reference-and-code' => [
206+
'blockName' => 'references/reference-and-code',
207+
'useIndenter' => false,
208+
];
209+
200210
yield 'code-block-php' => [
201211
'blockName' => 'code-blocks/php',
202212
];
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
7+
</head>
8+
9+
<body>
10+
<p>Next, create the template used to render the field in the <code translate="no" class="notranslate">index</code> and <code translate="no" class="notranslate">detail</code>
11+
<a href="https://symfony.com/doc/current/bundles/EasyAdminBundle/crud.html" class="reference external">CRUD pages</a>.</p>
12+
<p>More about CRUD pages.</p>
13+
14+
</body>
15+
</html>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Next, create the template used to render the field in the ``index`` and ``detail``
2+
`CRUD pages`_.
3+
4+
More about CRUD pages.
5+
6+
.. _`CRUD pages`: https://symfony.com/doc/current/bundles/EasyAdminBundle/crud.html

0 commit comments

Comments
 (0)