ErrorHandlerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testCreateService() 0 10 1
1
<?php
2
3
namespace DmCommonTest\Factory\Service;
4
5
use DmCommon\Factory\Service\ErrorHandler;
6
7
use DmTest\ServiceManager\ServiceLocatorDummy;
8
9
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
10
{
11
    /** @var ErrorHandler */
12
    private $sut;
13
14
    public function setUp()
15
    {
16
        $this->sut = new ErrorHandler();
17
    }
18
19
    /**
20
     * @covers DmCommon\Factory\Service\ErrorHandler
21
     */
22
    public function testCreateService()
23
    {
24
        $serviceLocator = new ServiceLocatorDummy($this);
25
26
        $serviceLocator->set('DmCommon\Exception\Log', $serviceLocator->get('Zend\Log\Logger'));
27
28
        $result = $this->sut->createService($serviceLocator);
29
30
        $this->assertInstanceOf('DmCommon\Service\ErrorHandler', $result);
31
    }
32
}
33