-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af50d4e
commit b31954b
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<chapter xml:id="enum_link_rendering" xmlns="http://docbook.org/ns/docbook"> | ||
|
||
<section> | ||
<para>1. Existing Enum linking</para> | ||
<enumname>Enum\Namespace\Existing_Enum</enumname> | ||
<enumname>\Enum\Namespace\Existing_Enum</enumname> | ||
</section> | ||
|
||
<section> | ||
<para>2. Enum linking (non-FQN) in method/function parameter and return type</para> | ||
<methodsynopsis> | ||
<type>Enum\Namespace\Existing_Enum</type><methodname>method_name</methodname> | ||
<methodparam><type>Enum\Namespace\Existing_Enum</type><parameter>paramName</parameter></methodparam> | ||
</methodsynopsis> | ||
</section> | ||
|
||
<section> | ||
<para>3. Enum linking (FQN) in method/function parameter and return type</para> | ||
<methodsynopsis> | ||
<type>\Enum\Namespace\Existing_Enum</type><methodname>method_name</methodname> | ||
<methodparam><type>\Enum\Namespace\Existing_Enum</type><parameter>paramName</parameter></methodparam> | ||
</methodsynopsis> | ||
</section> | ||
|
||
</chapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--TEST-- | ||
Enum link rendering | ||
--FILE-- | ||
<?php | ||
namespace phpdotnet\phd; | ||
|
||
require_once __DIR__ . "/../../setup.php"; | ||
|
||
$config->xmlFile = __DIR__ . "/data/enum_link_rendering.xml"; | ||
|
||
$format = new TestPHPChunkedXHTML($config, $outputHandler); | ||
$format->SQLiteIndex( | ||
null, // $context, | ||
null, // $index, | ||
"enum.enum-namespace-existing-enum", // $id, | ||
"enumname.enumpage", // $filename, | ||
"", // $parent, | ||
"", // $sdesc, | ||
"", // $ldesc, | ||
"phpdoc:classref", // $element, | ||
"", // $previous, | ||
"", // $next, | ||
0, // $chunk | ||
); | ||
|
||
$format->addClassname("enum.enum-namespace-existing-enum", "enum\\namespace\\existing_enum"); | ||
|
||
$render = new TestRender(new Reader($outputHandler), $config, $format); | ||
$render->run(); | ||
?> | ||
--EXPECT-- | ||
Filename: enum_link_rendering.html | ||
Content: | ||
<div id="enum_link_rendering" class="chapter"> | ||
|
||
<div class="section"> | ||
<p class="para">1. Existing Enum linking</p> | ||
<span class="enumname"><a href="enum.enum-namespace-existing-enum.html" class="enumname">Enum\Namespace\Existing_Enum</a></span> | ||
<span class="enumname"><a href="enum.enum-namespace-existing-enum.html" class="enumname">\Enum\Namespace\Existing_Enum</a></span> | ||
</div> | ||
|
||
<div class="section"> | ||
<p class="para">2. Enum linking (non-FQN) in method/function parameter and return type</p> | ||
<div class="methodsynopsis dc-description"><span class="methodname"><strong>method_name</strong></span>(<span class="methodparam"><span class="type"><a href="enumname.enumpage.html" class="type Enum\Namespace\Existing_Enum">Enum\Namespace\Existing_Enum</a></span> <code class="parameter">$paramName</code></span>): <span class="type"><a href="enumname.enumpage.html" class="type Enum\Namespace\Existing_Enum">Enum\Namespace\Existing_Enum</a></span></div> | ||
|
||
</div> | ||
|
||
<div class="section"> | ||
<p class="para">3. Enum linking (FQN) in method/function parameter and return type</p> | ||
<div class="methodsynopsis dc-description"><span class="methodname"><strong>method_name</strong></span>(<span class="methodparam"><span class="type"><a href="enumname.enumpage.html" class="type Enum\Namespace\Existing_Enum">\Enum\Namespace\Existing_Enum</a></span> <code class="parameter">$paramName</code></span>): <span class="type"><a href="enumname.enumpage.html" class="type Enum\Namespace\Existing_Enum">\Enum\Namespace\Existing_Enum</a></span></div> | ||
|
||
</div> | ||
|
||
</div> |