Skip to content

Commit 96d41f2

Browse files
committed
Clean up test cases.
1 parent 4c23ebb commit 96d41f2

File tree

1 file changed

+35
-16
lines changed

1 file changed

+35
-16
lines changed

test/test_doc.rst

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,10 @@ Test Case - Global symbols with no namespaces
168168

169169
:php:func:`DateTime::setDate()`
170170

171-
:php:func:`~DateTime::setDate()` Should not be prefixed with a classname
172-
173171
:php:func:`DateTime::ATOM`
174172

175173
:php:func:`DateTime::$testattr`
176174

177-
:php:func:`~DateTime::$testattr` Should not be prefixed with classname
178-
179175
:php:func:`OtherClass::update`
180176

181177
:php:attr:`OtherClass::$nonIndentedAttribute`
@@ -202,11 +198,21 @@ Test Case - Global symbols with no namespaces
202198

203199
:php:func:`LogTrait::log()`
204200

205-
.. php:namespace:: LibraryName
201+
Test Case - Prefix less links
202+
-----------------------------
203+
204+
The following links should not be prefixed with a classname.
205+
206+
:php:func:`~DateTime::setDate()`
207+
208+
:php:attr:`~DateTime::$testattr`
209+
206210

207211
Namespaced elements
208212
===================
209213

214+
.. php:namespace:: LibraryName
215+
210216
.. php:function:: namespaced_function($one[, $two])
211217
212218
A function in a namespace
@@ -312,6 +318,8 @@ Namespaced elements
312318
Test Case - not including namespace
313319
-----------------------------------
314320

321+
Within a namespace context you don't need to include the namespace in links.
322+
315323
:php:ns:`LibraryName`
316324

317325
:php:func:`namespaced_function()`
@@ -320,23 +328,14 @@ Test Case - not including namespace
320328

321329
:php:class:`LibraryClass`
322330

323-
:php:class:`~LibraryName\\LibraryClass` Should not be be prefixed with
324-
classname.
325-
326331
:php:func:`LibraryClass::instanceMethod`
327332

328-
:php:func:`~LibraryClass::instanceMethod` Should not be prefixed with classname.
329-
330333
:php:func:`LibraryClass::staticMethod()`
331334

332335
:php:attr:`LibraryClass::$property`
333336

334-
:php:attr:`~LibraryClass::$property` Should not be prefixed with classname.
335-
336337
:php:const:`LibraryClass::TEST_CONST`
337338

338-
:php:const:`~LibraryClass::TEST_CONST` Should not be prefixed with classname.
339-
340339
:php:class:`LibraryName\\OtherClass`
341340

342341
:php:class:`LibraryName\\ThirdClass`
@@ -363,8 +362,6 @@ classname.
363362

364363
:php:interface:`LibraryInterface`
365364

366-
:php:interface:`~LibraryName\\LibraryInterface`
367-
368365
:php:func:`LibraryInterface::instanceMethod`
369366

370367
:php:exc:`NamespaceException`
@@ -375,6 +372,28 @@ classname.
375372

376373
:php:func:`LibraryName\\TemplateTrait::render()`
377374

375+
Test Case - Links with prefix trimming
376+
--------------------------------------
377+
378+
All of the following links should not be prefixed with a namespace.
379+
380+
:php:interface:`~LibraryName\\LibraryInterface`
381+
382+
:php:class:`~LibraryName\\LibraryClass`
383+
384+
:php:trait:`~LibraryName\\TemplateTrait`
385+
386+
:php:exc:`~LibraryName\\NamespaceException`
387+
388+
All of the following links should not be prefixed with a classname.
389+
390+
:php:func:`~LibraryClass::instanceMethod`
391+
392+
:php:const:`~LibraryClass::TEST_CONST`
393+
394+
:php:attr:`~LibraryClass::$property`
395+
396+
378397
Test Case - global access
379398
-------------------------
380399

0 commit comments

Comments
 (0)