I think this is an incompatibility between the @test command in Doxygen and php, but I am hoping someone can point me towards a workaround, which my googles skills have been unable to find.
The error can be reproduced by documenting the file:
<?php
namespace TestNamespace;
/** @test This is a test
*
* @test This is a second test
*/
class TestClass { }
/** @test This is a test on another class
*/
class TestClass2 { }
When generating the documentation there are warnings:
test:2: warning: Illegal command TestClass as part of a \ref
test:4: warning: Illegal command TestClass2 as part of a \ref
The html page produced for TestClass
and TestClass2
both show the proper tests. If, however, you navigate to the Test List page, the display names for the classes are incorrect, as can be seen in this screenshot:
When clicking the TestNamespace
links, the proper class page is navigated to, so it appears the only problems are the warnings printed to stderr during generation and the display name of the classes on the Test List page.
The only way I can think of to fix this is to stop using namespaces, at which point the cure is worse than the disease. I am hoping someone has run into this before and has a way to fix this behaviour. I am okay with using ::
or as a namespace specifier in the documentation if necessary.