diff --git a/developer_manual/app/testing.rst b/developer_manual/app/testing.rst index 82b45d4de..11a253881 100644 --- a/developer_manual/app/testing.rst +++ b/developer_manual/app/testing.rst @@ -51,15 +51,17 @@ would look like this: .. code-block:: php container = $app->getContainer(); $this->storage = $storage = $this->getMockBuilder('\OCP\Files\Folder') @@ -84,3 +86,8 @@ would look like this: } } + +Make sure to extend the ``\Test\TestCase`` class with your test and always call the parent methods, +when overwriting ``setUp()``, ``setUpBeforeClass()``, ``tearDown()`` or ``tearDownAfterClass()`` method +from the TestCase. These methods set up important stuff and clean up the system after the test, +so the next test can run without side effects, like remaining files and entries in the file cache, etc.