MetadataListenerFactoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testInvoke() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\DoctrineDDMTest\Unit\Factory;
6
7
use Facile\DoctrineDDM\Configuration\Metadata;
8
use Facile\DoctrineDDM\Factory\MetadataListenerFactory;
9
use Facile\DoctrineDDM\MetadataListener;
10
use Facile\DoctrineDDMTest\Framework\TestCase;
11
use Interop\Container\ContainerInterface;
12
13
class MetadataListenerFactoryTest extends TestCase
14
{
15
    public function testInvoke()
16
    {
17
        $metadataConfig = $this->prophesize(Metadata::class);
18
        $container = $this->prophesize(ContainerInterface::class);
19
        $container->get(Metadata::class)->willReturn($metadataConfig->reveal());
20
21
        $factory = new MetadataListenerFactory();
22
23
        $instance = $factory($container->reveal());
24
25
        $this->assertInstanceOf(MetadataListener::class, $instance);
26
    }
27
}
28