Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/privacy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Integration/AppTest.php')
-rw-r--r--tests/Integration/AppTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Integration/AppTest.php b/tests/Integration/AppTest.php
new file mode 100644
index 0000000..632300b
--- /dev/null
+++ b/tests/Integration/AppTest.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace OCA\Privacy\Tests\Integration\Controller;
+
+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('privacy');
+ $this->container = $app->getContainer();
+ }
+
+ public function testAppInstalled() {
+ $appManager = $this->container->query('OCP\App\IAppManager');
+ $this->assertTrue($appManager->isInstalled('privacy'));
+ }
+
+}