Completed
Branch test-environment (ae587d)
by Julius
02:23
created

AppTest::testAppInstalled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * ownCloud - foobar
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author jus <[email protected]>
9
 * @copyright jus 2016
10
 */
11
12
use OCP\AppFramework\App;
13
use Test\TestCase;
14
15
16
/**
17
 * This test shows how to make a small Integration Test. Query your class
18
 * directly from the container, only pass in mocks if needed and run your tests
19
 * against the database
20
 */
21
class AppTest extends TestCase {
22
23
    private $container;
24
25
    public function setUp() {
26
        parent::setUp();
27
        $app = new App('apporder');
28
        $this->container = $app->getContainer();
29
    }
30
31
    public function testAppInstalled() {
32
        $appManager = $this->container->query('OCP\App\IAppManager');
33
        $this->assertTrue($appManager->isInstalled('apporder'));
34
    }
35
36
}
37