Completed
Push — master ( d5dc6c...9a2ca3 )
by Alejandro
11s
created

InstallApplicationFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A serviceIsCreated() 0 8 1
1
<?php
2
declare(strict_types=1);
3
4
namespace ShlinkioTest\Shlink\Installer\Factory;
5
6
use PHPUnit\Framework\TestCase;
7
use Shlinkio\Shlink\Installer\Factory\InstallApplicationFactory;
8
use Symfony\Component\Console\Application;
9
use Symfony\Component\Filesystem\Filesystem;
10
use Zend\ServiceManager\ServiceManager;
11
12
class InstallApplicationFactoryTest extends TestCase
13
{
14
    /**
15
     * @var InstallApplicationFactory
16
     */
17
    private $factory;
18
19
    public function setUp()
20
    {
21
        $this->factory = new InstallApplicationFactory();
22
    }
23
24
    /**
25
     * @test
26
     */
27
    public function serviceIsCreated()
28
    {
29
        $instance = $this->factory->__invoke(new ServiceManager(['services' => [
30
            Filesystem::class => $this->prophesize(Filesystem::class)->reveal(),
31
        ]]), '');
32
33
        $this->assertInstanceOf(Application::class, $instance);
34
    }
35
}
36