1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00
Files
archived-phd/tests/bug_GH-87.phpt
2024-12-29 19:58:10 +00:00

66 lines
1.3 KiB
PHP

--TEST--
GH-87 Broken links for constants in table rows
--FILE--
<?php
namespace phpdotnet\phd;
require_once __DIR__ . "/setup.php";
$xmlFile = __DIR__ . "/data/bug_GH-87.xml";
$config->forceIndex = true;
$config->xmlFile = $xmlFile;
$indexRepository = new IndexRepository(new \SQLite3(":memory:"));
$indexRepository->init();
$config->indexCache = $indexRepository;
$index = new TestIndex($indexRepository, $config, $outputHandler);
$render = new TestRender(new Reader($outputHandler), $config, null, $index);
$render->run();
$render = new TestRender(new Reader($outputHandler), $config);
$format = new TestGenericChunkedXHTML($config, $outputHandler);
$render->attach($format);
$render->run();
?>
--EXPECT--
Filename: constants.html
Content:
<div id="constants" class="chapter">
<div class="section">
<p class="para">Constant within a table (GH-87)</p>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody class="tbody">
<tr id="constant.defined">
<td><strong><code>CONSTANT_IS_DEFINED</code></strong></td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="section">
<p class="para">
<a href="constants.html#constant.defined" class="link">CONSTANT_IS_DEFINED</a>
</p>
</div>
</div>