Completed
Pull Request — master (#98)
by Alejandro
06:29
created

InstallApplicationFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

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