diff --git a/developer_manual/general/codingguidelines.rst b/developer_manual/general/codingguidelines.rst index 7b73d9a34..7cf90482d 100644 --- a/developer_manual/general/codingguidelines.rst +++ b/developer_manual/general/codingguidelines.rst @@ -165,6 +165,34 @@ Control Structures ?> +Unit tests +^^^^^^^^^^ +Unit tests must always extend the ``\Test\TestCase`` class, which takes care +of cleaning up the installation after the test. + +If a test is run with multiple different values, a data provider must be used. +The name of the data provider method must not start with ``test`` and must end +with ``Data``. + +.. code-block:: php + + assertEquals($expected, \Dummy::method($input)); + } + } JavaScript