From 7fa0d16e298b40bb83a05dd3eca0efdb400ea77f Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 4 Dec 2012 18:07:26 +0100 Subject: [PATCH] added unittest namespace note --- developer_manual/tutorial.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/developer_manual/tutorial.rst b/developer_manual/tutorial.rst index c5ad75b1b..2820f134d 100644 --- a/developer_manual/tutorial.rst +++ b/developer_manual/tutorial.rst @@ -526,7 +526,9 @@ If you have to include an image in your CSS, use %appswebroot% and %webroot% for Unittests --------- -.. note:: App Unittests should **not depend on a running ownCloud instance**! They should be able to run in isolation. To achieve that, abstract the ownCloud core functions in the :file:`lib/api.php` and use a mock for testing +.. note:: App Unittests should **not depend on a running ownCloud instance**! They should be able to run in isolation. To achieve that, abstract the ownCloud core functions in the :file:`lib/api.php` and use a mock for testing. + +.. note:: Also use your app's namespace in your test classes to avoid possible conflicts when the test is run on the buildserver Unittests go into your **tests/** directory. Create the same folder structure in the tests directory like on your app to make it easier to find tests for certain classes.