ApplicationTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testApplication() 0 10 1
A testAssets() 0 10 1
1
<?php
2
3
namespace Test;
4
5
use Basis\Application;
6
use Basis\Converter;
7
use Basis\Test;
8
use League\Container\Container;
9
10
class ApplicationTest extends Test
11
{
12
    public function testApplication()
13
    {
14
        $this->assertNotNull($this->app);
15
        $this->assertInstanceOf(Application::class, $this->app);
16
        $this->assertSame($this->app, $this->app->get(Application::class));
17
18
        $container = $this->app->get(Container::class);
19
        $this->assertInstanceOf(Container::class, $container);
20
        $this->assertSame($this->app, $container->get(Application::class));
21
    }
22
23
    public function testAssets()
24
    {
25
        $assets = get_object_vars($this->app->dispatch('module.assets'));
26
        $this->assertArrayHasKey('hash', $assets);
27
        $this->assertArrayHasKey('js', $assets);
28
        $this->assertArrayHasKey('test.js', get_object_vars($assets['js']));
29
        $this->assertArrayHasKey('styl', $assets);
30
        $this->assertArrayHasKey('file.styl', get_object_vars($assets['styl']));
31
32
    }
33
}
34