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

AppTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAppInstalled() 0 4 1
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