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

InstallApplicationFactoryTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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