ApplicationTest::testApplication()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
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