Completed
Push — master ( 4d222f...773846 )
by Alejandro
03:19
created

ErrorHandlerManagerFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A serviceIsCreated() 0 11 1
1
<?php
2
namespace AcelayaTest\Expressive\ErrorHandler\Factory;
3
4
use Acelaya\Expressive\ErrorHandler\ErrorHandlerManager;
5
use Acelaya\Expressive\ErrorHandler\Factory\ErrorHandlerManagerFactory;
6
use PHPUnit_Framework_TestCase as TestCase;
7
use Zend\ServiceManager\ServiceManager;
8
9
class ErrorHandlerManagerFactoryTest extends TestCase
10
{
11
    /**
12
     * @var ErrorHandlerManagerFactory
13
     */
14
    protected $factory;
15
16
    public function setUp()
17
    {
18
        $this->factory = new ErrorHandlerManagerFactory();
19
    }
20
21
    /**
22
     * @test
23
     */
24
    public function serviceIsCreated()
25
    {
26
        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
27
            'config' => [
28
                'error_handler' => [
29
                    'plugins' => [],
30
                ],
31
            ],
32
        ]]));
33
        $this->assertInstanceOf(ErrorHandlerManager::class, $instance);
34
    }
35
}
36