summaryrefslogtreecommitdiffstats
path: root/tests/integration/AppTest.php
diff options
context:
space:
mode:
authorHendrik Leppelsack <hendrik@leppelsack.de>2015-10-26 11:29:01 +0100
committerHendrik Leppelsack <hendrik@leppelsack.de>2015-10-26 11:29:01 +0100
commit14804ae7b7d7a2d006b42189ad303241cde2550b (patch)
tree41740c2f9a49d9491f34a1db30261e9cb52608e1 /tests/integration/AppTest.php
Initial commit
Diffstat (limited to 'tests/integration/AppTest.php')
-rw-r--r--tests/integration/AppTest.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/integration/AppTest.php b/tests/integration/AppTest.php
new file mode 100644
index 00000000..92c1435c
--- /dev/null
+++ b/tests/integration/AppTest.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * ownCloud - contactsrework
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Hendrik Leppelsack <hendrik@leppelsack.de>
+ * @copyright Hendrik Leppelsack 2015
+ */
+
+use OCP\AppFramework\App;
+use Test\TestCase;
+
+
+/**
+ * This test shows how to make a small Integration Test. Query your class
+ * directly from the container, only pass in mocks if needed and run your tests
+ * against the database
+ */
+class AppTest extends TestCase {
+
+ private $container;
+
+ public function setUp() {
+ parent::setUp();
+ $app = new App('contactsrework');
+ $this->container = $app->getContainer();
+ }
+
+ public function testAppInstalled() {
+ $appManager = $this->container->query('OCP\App\IAppManager');
+ $this->assertTrue($appManager->isInstalled('contactsrework'));
+ }
+
+} \ No newline at end of file