Skip to content

Commit 8e807b8

Browse files
committed
Failing test case for a missing line break with anchors
1 parent 82a2fa3 commit 8e807b8

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
@@ -121,7 +121,7 @@ public function integrationProvider()
121121
/**
122122
* @dataProvider parserUnitBlockProvider
123123
*/
124-
public function testParseUnitBlock(string $blockName)
124+
public function testParseUnitBlock(string $blockName, bool $useIndenter = true)
125125
{
126126
$configuration = new Configuration();
127127
$configuration->setCustomTemplateDirs([__DIR__.'/Templates']);
@@ -137,6 +137,11 @@ public function testParseUnitBlock(string $blockName)
137137
$indenter = $this->createIndenter();
138138

139139
$expectedFile = sprintf('%s/fixtures/expected/blocks/%s.html', __DIR__, $blockName);
140+
141+
if (!$useIndenter) {
142+
$this->assertSame(file_get_contents($expectedFile), $document);
143+
}
144+
140145
$this->assertSame(
141146
str_replace(" \n", "\n", $indenter->indent(file_get_contents($expectedFile))),
142147
str_replace(" \n", "\n", $indenter->indent($document))
@@ -233,6 +238,11 @@ public function parserUnitBlockProvider()
233238
'blockName' => 'references/php-method',
234239
];
235240

241+
yield 'reference-and-code' => [
242+
'blockName' => 'references/reference-and-code',
243+
'useIndenter' => false,
244+
];
245+
236246
yield 'code-block-php' => [
237247
'blockName' => 'code-blocks/php',
238248
];
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)