ErrorHandlerTest::testCreateService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 10
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
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