php_unit_fqcn_annotation.rst 962 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. =================================
  2. Rule ``php_unit_fqcn_annotation``
  3. =================================
  4. PHPUnit annotations should be a FQCNs including a root namespace.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. final class MyTest extends \PHPUnit_Framework_TestCase
  14. {
  15. /**
  16. - * @expectedException InvalidArgumentException
  17. - * @covers Project\NameSpace\Something
  18. - * @coversDefaultClass Project\Default
  19. - * @uses Project\Test\Util
  20. + * @expectedException \InvalidArgumentException
  21. + * @covers \Project\NameSpace\Something
  22. + * @coversDefaultClass \Project\Default
  23. + * @uses \Project\Test\Util
  24. */
  25. public function testSomeTest()
  26. {
  27. }
  28. }
  29. Rule sets
  30. ---------
  31. The rule is part of the following rule sets:
  32. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  33. - `@Symfony <./../../ruleSets/Symfony.rst>`_