ModuleTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A itRegistersTestAspectViaConfiguration() 0 16 1
1
<?php
2
3
namespace Go\Zend\Framework\Tests\Integration;
4
5
use Go\Core\AspectContainer;
6
use Go\Core\GoAspectContainer;
7
use Go\Zend\Framework\Tests\Aspect\TestAspect;
8
use PHPUnit\Framework\TestCase;
9
use Zend\Mvc\Application;
10
11
/**
12
 * @package Go\Zend\Framework\Tests\Integration
13
 */
14
class ModuleTest extends TestCase
15
{
16
    /**
17
     * @test
18
     */
19
    public function itRegistersTestAspectViaConfiguration()
20
    {
21
        $configuration = require __DIR__ . '/../resources/application_config.php';
22
        $application = Application::init($configuration);
23
24
        /** @var GoAspectContainer $container */
25
        $container = $application->getServiceManager()->get(AspectContainer::class);
26
27
        $aspect = $container->getAspect(TestAspect::class);
28
29
        $this->assertInstanceOf(
30
            TestAspect::class,
31
            $aspect,
32
            'aspect should be instance of registered test aspect class'
33
        );
34
    }
35
}