Skip to content

Commit

Permalink
Closes #351
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed May 11, 2024
1 parent a7230ee commit 681f6b6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,21 @@ The ``CoversClass(string $className)`` attribute can be used to :ref:`specify <c
that a test intends to cover the given class.


.. _appendixes.attributes.CoversTrait:

``CoversTrait``
---------------

+-------------+--------------+------------+
| Class Level | Method Level | Repeatable |
+=============+==============+============+
| yes | no | yes |
+-------------+--------------+------------+

The ``CoversTrait(string $traintName)`` attribute can be used to :ref:`specify <code-coverage.targeting-units-of-code>`
that a test intends to cover the given trait.


.. _appendixes.attributes.CoversMethod:

``CoversMethod``
Expand Down Expand Up @@ -281,6 +296,22 @@ that a test allows the execution of code in the given class, but does not intend
in the context of :ref:`preventing unintentionally covered code <risky-tests.unintentionally-covered-code>`.


.. _appendixes.attributes.UsesTrait:

``UsesTrait``
-------------

+-------------+--------------+------------+
| Class Level | Method Level | Repeatable |
+=============+==============+============+
| yes | no | yes |
+-------------+--------------+------------+

The ``UsesTrait(string $traitName)`` attribute can be used to :ref:`specify <code-coverage.targeting-units-of-code>`
that a test allows the execution of code in the given trait, but does not intend to cover it. This is relevant
in the context of :ref:`preventing unintentionally covered code <risky-tests.unintentionally-covered-code>`.


.. _appendixes.attributes.UsesMethod:

``UsesMethod``
Expand Down

0 comments on commit 681f6b6

Please sign in to comment.