Passed
Push — master ( b2b84f...109e7c )
by Thomas Mauro
03:02
created

SetupTransportsCommandFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 20
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace TMV\Laminas\Messenger\Test\Factory\Command;
6
7
use PHPUnit\Framework\TestCase;
8
use Prophecy\PhpUnit\ProphecyTrait;
9
use Psr\Container\ContainerInterface;
10
use Symfony\Component\Messenger\Command\SetupTransportsCommand;
11
use TMV\Laminas\Messenger\Factory\Command\SetupTransportsCommandFactory;
12
13
class SetupTransportsCommandFactoryTest extends TestCase
14
{
15
    use ProphecyTrait;
16
17
    public function testFactory(): void
18
    {
19
        $container = $this->prophesize(ContainerInterface::class);
20
21
        $container->has('config')->willReturn(true);
22
        $container->get('config')->willReturn([
23
            'messenger' => [
24
                'transports' => [],
25
            ],
26
        ]);
27
28
        $factory = new SetupTransportsCommandFactory();
29
30
        $service = $factory($container->reveal());
31
32
        $this->assertInstanceOf(SetupTransportsCommand::class, $service);
33
    }
34
}
35