Skip to content

Commit f3693a6

Browse files
committed
Update tests
add/restore some of the missing cross link tests. I think the link sections need to be better organized still.
1 parent 55e7709 commit f3693a6

File tree

2 files changed

+41
-94
lines changed

2 files changed

+41
-94
lines changed

test/unit/test_doc.html

Lines changed: 30 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ <h2>Classes<a class="headerlink" href="#classes" title="Link to this heading">&#
116116
<dl class="php method">
117117
<dt class="sig sig-object php" id="DateTime::setTime"><span class="sig-name descname"><span class="pre">setTime</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">$hour</span></em>, <em class="sig-param"><span class="pre">$minute</span></em><span class="optional">[</span>, <em class="sig-param"><span class="pre">$second</span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#DateTime::setTime" title="Link to this definition">&#xB6;</a></dt>
118118
<dd>
119-
<p>Set the time</p>
119+
<p>Set the time. See <a class="reference internal" href="#DateTime::setDate" title="DateTime::setDate"><code class="xref php php-func docutils literal notranslate"><span class="pre">setDate()</span></code></a> for changing the date.</p>
120120
<dl class="field-list simple">
121121
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
122122
<dd class="field-odd">
@@ -617,7 +617,7 @@ <h3>Test Case - Prefix less links<a class="headerlink" href="#test-case-prefix-l
617617
<section id="namespaced-elements">
618618
<h2>Namespaced elements<a class="headerlink" href="#namespaced-elements" title="Link to this heading">&#xB6;</a></h2>
619619
<dl class="php function" id="namespace-LibraryName">
620-
<dt class="sig sig-object php" id="LibraryName\namespaced_function"><span class="sig-prename descclassname"><span class="pre">LibraryName\</span></span><span class="sig-name descname"><span class="pre">namespaced_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">$one</span></em><span class="optional">[</span>, <em class="sig-param"><span class="pre">$two</span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#LibraryName\namespaced_function" title="Link to this definition">&#xB6;</a></dt>
620+
<dt class="sig sig-object php" id="LibraryName\namespaced_function"><span class="sig-name descname"><span class="pre">namespaced_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">$one</span></em><span class="optional">[</span>, <em class="sig-param"><span class="pre">$two</span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#LibraryName\namespaced_function" title="Link to this definition">&#xB6;</a></dt>
621621
<dd>
622622
<p>A function in a namespace</p>
623623
<dl class="field-list simple">
@@ -1057,73 +1057,17 @@ <h3>Test Case - not including namespace<a class="headerlink" href="#test-case-no
10571057
</code>
10581058
</a>
10591059
</p>
1060-
<p>
1061-
<a class="reference internal" href="#LibraryName\NamespaceClass::NAMESPACE_CONST" title="LibraryName\NamespaceClass::NAMESPACE_CONST">
1062-
<code class="xref php php-const docutils literal notranslate">
1063-
<span class="pre">NamespaceClass::NAMESPACE_CONST</span>
1064-
</code>
1065-
</a>
1066-
</p>
1067-
<p>
1068-
<a class="reference internal" href="#LibraryName\LibraryClassFinal" title="LibraryName\LibraryClassFinal">
1069-
<code class="xref php php-class docutils literal notranslate">
1070-
<span class="pre">LibraryClassFinal</span>
1071-
</code>
1072-
</a>
1073-
</p>
1074-
<p>
1075-
<a class="reference internal" href="#LibraryName\LibraryClassFinal::firstMethod" title="LibraryName\LibraryClassFinal::firstMethod">
1076-
<code class="xref php php-meth docutils literal notranslate">
1077-
<span class="pre">LibraryClassFinal::firstMethod</span>
1078-
</code>
1079-
</a>
1080-
</p>
1081-
<p>
1082-
<a class="reference internal" href="#LibraryName\LibraryClassFinal::secondMethod" title="LibraryName\LibraryClassFinal::secondMethod">
1083-
<code class="xref php php-meth docutils literal notranslate">
1084-
<span class="pre">LibraryClassFinal::secondMethod</span>
1085-
</code>
1086-
</a>
1087-
</p>
1088-
<p>
1089-
<a class="reference internal" href="#LibraryName\LibraryClassFinal::thirdMethod" title="LibraryName\LibraryClassFinal::thirdMethod">
1090-
<code class="xref php php-meth docutils literal notranslate">
1091-
<span class="pre">LibraryClassFinal::thirdMethod</span>
1092-
</code>
1093-
</a>
1094-
</p>
1095-
<p>
1096-
<a class="reference internal" href="#LibraryName\LibraryClassFinal::fourthMethod" title="LibraryName\LibraryClassFinal::fourthMethod">
1097-
<code class="xref php php-meth docutils literal notranslate">
1098-
<span class="pre">LibraryClassFinal::fourthMethod</span>
1099-
</code>
1100-
</a>
1101-
</p>
1102-
<p>
1103-
<a class="reference internal" href="#LibraryName\LibraryClassFinal::fifthMethod" title="LibraryName\LibraryClassFinal::fifthMethod">
1104-
<code class="xref php php-meth docutils literal notranslate">
1105-
<span class="pre">LibraryClassFinal::fifthMethod</span>
1106-
</code>
1107-
</a>
1108-
</p>
11091060
<p>
11101061
<a class="reference internal" href="#LibraryName\LibraryInterface" title="LibraryName\LibraryInterface">
11111062
<code class="xref php php-interface docutils literal notranslate">
1112-
<span class="pre">LibraryInterface</span>
1113-
</code>
1114-
</a>
1115-
</p>
1116-
<p>
1117-
<a class="reference internal" href="#LibraryName\LibraryInterface::instanceMethod" title="LibraryName\LibraryInterface::instanceMethod">
1118-
<code class="xref php php-func docutils literal notranslate">
1119-
<span class="pre">LibraryInterface::instanceMethod</span>
1063+
<span class="pre">LibraryName\LibraryInterface</span>
11201064
</code>
11211065
</a>
11221066
</p>
11231067
<p>
11241068
<a class="reference internal" href="#LibraryName\NamespaceException" title="LibraryName\NamespaceException">
11251069
<code class="xref php php-exc docutils literal notranslate">
1126-
<span class="pre">NamespaceException</span>
1070+
<span class="pre">LibraryName\NamespaceException</span>
11271071
</code>
11281072
</a>
11291073
</p>
@@ -1155,28 +1099,28 @@ <h3>Test Case - Links with prefix trimming<a class="headerlink" href="#test-case
11551099
<p>
11561100
<a class="reference internal" href="#LibraryName\LibraryInterface" title="LibraryName\LibraryInterface">
11571101
<code class="xref php php-interface docutils literal notranslate">
1158-
<span class="pre">LibraryName\LibraryInterface</span>
1102+
<span class="pre">LibraryInterface</span>
11591103
</code>
11601104
</a>
11611105
</p>
11621106
<p>
11631107
<a class="reference internal" href="#LibraryName\LibraryClass" title="LibraryName\LibraryClass">
11641108
<code class="xref php php-class docutils literal notranslate">
1165-
<span class="pre">LibraryName\LibraryClass</span>
1109+
<span class="pre">LibraryClass</span>
11661110
</code>
11671111
</a>
11681112
</p>
11691113
<p>
11701114
<a class="reference internal" href="#LibraryName\TemplateTrait" title="LibraryName\TemplateTrait">
11711115
<code class="xref php php-trait docutils literal notranslate">
1172-
<span class="pre">LibraryName\TemplateTrait</span>
1116+
<span class="pre">TemplateTrait</span>
11731117
</code>
11741118
</a>
11751119
</p>
11761120
<p>
11771121
<a class="reference internal" href="#LibraryName\NamespaceException" title="LibraryName\NamespaceException">
11781122
<code class="xref php php-exc docutils literal notranslate">
1179-
<span class="pre">LibraryName\NamespaceException</span>
1123+
<span class="pre">NamespaceException</span>
11801124
</code>
11811125
</a>
11821126
</p>
@@ -1233,14 +1177,6 @@ <h3>Test Case - global access<a class="headerlink" href="#test-case-global-acces
12331177
</code>
12341178
</a>
12351179
</p>
1236-
<p>
1237-
<a class="reference internal" href="#LibraryName\LibraryClass::$property" title="LibraryName\LibraryClass::$property">
1238-
<code class="xref php php-attr docutils literal notranslate">
1239-
<span class="pre">LibraryName\LibraryClass::$property</span>
1240-
</code>
1241-
</a>
1242-
</p>
1243-
<p><a class="reference internal" href="#LibraryName\LibraryClass::$property" title="LibraryName\LibraryClass::$property"><code class="xref php php-attr docutils literal notranslate"><span class="pre">$property</span></code></a> Should not be prefixed with classname.</p>
12441180
<p>
12451181
<a class="reference internal" href="#LibraryName\LibraryClass::TEST_CONST" title="LibraryName\LibraryClass::TEST_CONST">
12461182
<code class="xref php php-const docutils literal notranslate">
@@ -1269,6 +1205,21 @@ <h3>Test Case - global access<a class="headerlink" href="#test-case-global-acces
12691205
</code>
12701206
</a>
12711207
</p>
1208+
<p>
1209+
<a class="reference internal" href="#LibraryName\LibraryClass::$property" title="LibraryName\LibraryClass::$property">
1210+
<code class="xref php php-attr docutils literal notranslate">
1211+
<span class="pre">LibraryName\LibraryClass::$property</span>
1212+
</code>
1213+
</a>
1214+
</p>
1215+
<p>Should not be prefixed with classname.</p>
1216+
<p>
1217+
<a class="reference internal" href="#LibraryName\LibraryClass::$property" title="LibraryName\LibraryClass::$property">
1218+
<code class="xref php php-attr docutils literal notranslate">
1219+
<span class="pre">$property</span>
1220+
</code>
1221+
</a>
1222+
</p>
12721223
</section>
12731224
</section>
12741225
<section id="any-cross-ref">
@@ -1385,6 +1336,13 @@ <h3>Test Case - Test subpackage links<a class="headerlink" href="#test-case-test
13851336
</code>
13861337
</a>
13871338
</p>
1339+
<p>
1340+
<a class="reference internal" href="#LibraryName\namespaced_function" title="LibraryName\namespaced_function">
1341+
<code class="xref php php-func docutils literal notranslate">
1342+
<span class="pre">LibraryName\namespaced_function</span>
1343+
</code>
1344+
</a>
1345+
</p>
13881346
</section>
13891347
</section>
13901348
<section id="return-types">

test/unit/test_doc.rst

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -344,25 +344,9 @@ Within a namespace context you don't need to include the namespace in links.
344344

345345
:php:attr:`NamespaceClass::$property`
346346

347-
:php:const:`NamespaceClass::NAMESPACE_CONST`
347+
:php:interface:`LibraryName\\LibraryInterface`
348348

349-
:php:class:`LibraryClassFinal`
350-
351-
:php:meth:`LibraryClassFinal::firstMethod`
352-
353-
:php:meth:`LibraryClassFinal::secondMethod`
354-
355-
:php:meth:`LibraryClassFinal::thirdMethod`
356-
357-
:php:meth:`LibraryClassFinal::fourthMethod`
358-
359-
:php:meth:`LibraryClassFinal::fifthMethod`
360-
361-
:php:interface:`LibraryInterface`
362-
363-
:php:func:`LibraryInterface::instanceMethod`
364-
365-
:php:exc:`NamespaceException`
349+
:php:exc:`LibraryName\\NamespaceException`
366350

367351
:php:trait:`TemplateTrait`
368352

@@ -403,10 +387,6 @@ Test Case - global access
403387

404388
:php:const:`SOME_CONSTANT`
405389

406-
:php:attr:`LibraryName\\LibraryClass::$property`
407-
408-
:php:attr:`~LibraryName\\LibraryClass::$property` Should not be prefixed with classname.
409-
410390
:php:const:`LibraryName\\LibraryClass::TEST_CONST`
411391

412392
:php:const:`LibraryName\\NS_CONST`
@@ -415,6 +395,13 @@ Test Case - global access
415395

416396
:php:func:`DateTimeInterface::setTime()`
417397

398+
:php:attr:`LibraryName\\LibraryClass::$property`
399+
400+
Should not be prefixed with classname.
401+
402+
:php:attr:`~LibraryName\\LibraryClass::$property`
403+
404+
418405
Any Cross Ref
419406
=============
420407

@@ -454,6 +441,8 @@ Test Case - Test subpackage links
454441

455442
:php:exc:`LibraryName\\SubPackage\\NestedNamespaceException`
456443

444+
:php:func:`LibraryName\\namespaced_function`
445+
457446
Return Types
458447
============
459448

0 commit comments

Comments
 (0)