@@ -166,7 +166,7 @@ Test Case - Global symbols with no namespaces
166166
167167:php:func: `DateTime::getLastErrors() `
168168
169- :php:func: `~ DateTime::setDate() `
169+ :php:func: `DateTime::setDate() `
170170
171171:php:func: `DateTime::ATOM `
172172
@@ -198,11 +198,21 @@ Test Case - Global symbols with no namespaces
198198
199199:php:func: `LogTrait::log() `
200200
201- .. 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+
202210
203211Namespaced elements
204212===================
205213
214+ .. php :namespace :: LibraryName
215+
206216 .. php :function :: namespaced_function($one[, $two])
207217
208218 A function in a namespace
@@ -308,6 +318,8 @@ Namespaced elements
308318Test Case - not including namespace
309319-----------------------------------
310320
321+ Within a namespace context you don't need to include the namespace in links.
322+
311323:php:ns: `LibraryName `
312324
313325:php:func: `namespaced_function() `
@@ -316,9 +328,6 @@ Test Case - not including namespace
316328
317329:php:class: `LibraryClass `
318330
319-
320- :php:class: `~LibraryName\\ LibraryClass `
321-
322331:php:func: `LibraryClass::instanceMethod `
323332
324333:php:func: `LibraryClass::staticMethod() `
@@ -353,8 +362,6 @@ Test Case - not including namespace
353362
354363:php:interface: `LibraryInterface `
355364
356- :php:interface: `~LibraryName\\ LibraryInterface `
357-
358365:php:func: `LibraryInterface::instanceMethod `
359366
360367:php:exc: `NamespaceException `
@@ -365,6 +372,28 @@ Test Case - not including namespace
365372
366373:php:func: `LibraryName\\ TemplateTrait::render() `
367374
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+
368397Test Case - global access
369398-------------------------
370399
@@ -378,6 +407,8 @@ Test Case - global access
378407
379408:php:attr: `LibraryName\\ LibraryClass::$property `
380409
410+ :php:attr: `~LibraryName\\ LibraryClass::$property ` Should not be prefixed with classname.
411+
381412:php:const: `LibraryName\\ LibraryClass::TEST_CONST `
382413
383414:php:const: `LibraryName\\ NS_CONST `
0 commit comments