Skip to content

Commit

Permalink
Closes #340
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 27, 2024
1 parent 73068c0 commit 95d74e4
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.CoversMethod:

``CoversMethod``
----------------

+------------+-------------+--------------+------------+
| Context | Class Level | Method Level | Repeatable |
+============+=============+==============+============+
| Test Code | yes | no | yes |
+------------+-------------+--------------+------------+

The ``CoversMethod(string $className, string $methodName)`` attribute can be used to :ref:`specify <code-coverage.specifying-covered-parts>`
that a test intends to cover the given method.


.. _appendixes.attributes.CoversFunction:

``CoversFunction``
Expand Down Expand Up @@ -266,6 +281,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.UsesMethod:

``UsesMethod``
--------------

+------------+-------------+--------------+------------+
| Context | Class Level | Method Level | Repeatable |
+============+=============+==============+============+
| Test Code | yes | no | yes |
+------------+-------------+--------------+------------+

The ``UsesMethod(string $className)`` attribute can be used to :ref:`specify <code-coverage.specifying-covered-parts>`
that a test allows the execution of code in the given method, 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.UsesFunction:

``UsesFunction``
Expand Down

0 comments on commit 95d74e4

Please sign in to comment.