mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 10:20:02 +07:00
@@ -665,7 +665,7 @@ Unit Tests
|
||||
----------
|
||||
A unit test is a test that tests a class in isolation. It is very fast and catches most of the bugs, so we want many unit tests.
|
||||
|
||||
Because ownCloud uses :doc:`Dependency Injection <container>` to assemble your app, it is very easy to write unit tests by passing mocks into the constructor. A simple test for the update method can added by adding this to **ownnotes/tests/unit/controller/NoteControllerTest.php**:
|
||||
Because ownCloud uses :doc:`Dependency Injection <container>` to assemble your app, it is very easy to write unit tests by passing mocks into the constructor. A simple test for the update method can be added by adding this to **ownnotes/tests/unit/controller/NoteControllerTest.php**:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
@@ -1330,4 +1330,4 @@ Now the only thing left is to style the textare in a nicer fashion. To do that o
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
Congratulations! You've written your first ownCloud app. You can now either try to further improve the tutorial notes app or start writing your own app.
|
||||
Congratulations! You've written your first ownCloud app. You can now either try to further improve the tutorial notes app or start writing your own app.
|
||||
|
||||
Reference in New Issue
Block a user