ErrorHandlerManagerFactoryTest::serviceIsCreated()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AcelayaTest\ExpressiveErrorHandler\ErrorHandler\Factory;
6
7
use Acelaya\ExpressiveErrorHandler\ErrorHandler\ErrorResponseGeneratorManager;
8
use Acelaya\ExpressiveErrorHandler\ErrorHandler\Factory\ErrorHandlerManagerFactory;
9
use PHPUnit\Framework\TestCase;
10
use Zend\ServiceManager\ServiceManager;
11
12
class ErrorHandlerManagerFactoryTest extends TestCase
13
{
14
    /** @var ErrorHandlerManagerFactory */
15
    protected $factory;
16
17
    public function setUp(): void
18
    {
19
        $this->factory = new ErrorHandlerManagerFactory();
20
    }
21
22
    /**
23
     * @test
24
     */
25
    public function serviceIsCreated(): void
26
    {
27
        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
28
            'config' => [
29
                'error_handler' => [
30
                    'plugins' => [],
31
                ],
32
            ],
33
        ]]));
34
        $this->assertInstanceOf(ErrorResponseGeneratorManager::class, $instance);
35
    }
36
}
37