diff --git a/developer_manual/app/tutorial.rst b/developer_manual/app/tutorial.rst index 1030d3147..bcc68554c 100644 --- a/developer_manual/app/tutorial.rst +++ b/developer_manual/app/tutorial.rst @@ -996,6 +996,26 @@ You can test the API by running a GET request with **curl**:: curl -u user:password http://localhost:8080/index.php/apps/ownnotes/api/0.1/notes +Since the **NoteApiController** is basically identical to the **NoteController**, the unit test for it simply inherits its tests from the **NoteControllerTest**. Create the file **ownnotes/tests/unit/controller/NoteApiControllerTest.php**: + +.. code-block:: php + + controller = new NoteApiController( + 'ownnotes', $this->request, $this->service, $this->userId + ); + } + + } + Adding JavaScript and CSS ========================= To create a modern webapp you need to write :doc:`JavaScript`. You can use any JavaScript framework but for this tutorial we want to keep it as simple as possible and therefore only include the templating library `handlebarsjs `_. `Download the file `_ into **ownnotes/js/handlebars.js** and include it at the very top of **ownnotes/templates/main.php** before the other scripts and styles: