Completed
Push — develop ( f11aab...a4697b )
by Alejandro
09:31
created

ConfigMigrationControllerFactoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testCreateService() 0 10 1
1
<?php
2
namespace AcMailerTest\Controller;
3
4
use AcMailer\Controller\ConfigMigrationController;
5
use AcMailer\Controller\Factory\ConfigMigrationControllerFactory;
6
use AcMailer\Service\ConfigMigrationService;
7
use AcMailerTest\ServiceManager\ServiceManagerMock;
8
use PHPUnit_Framework_TestCase as TestCase;
9
10
/**
11
 * Class ConfigMigrationControllerFactoryTest
12
 * @author Alejandro Celaya Alastrué
13
 * @link http://www.alejandrocelaya.com
14
 */
15
class ConfigMigrationControllerFactoryTest extends TestCase
16
{
17
    /** @var ConfigMigrationControllerFactory */
18
    private $factory;
19
20
    public function setUp()
21
    {
22
        $this->factory = new ConfigMigrationControllerFactory();
23
    }
24
25
    public function testCreateService()
26
    {
27
        $this->assertInstanceOf(
28
            ConfigMigrationController::class,
29
            $this->factory->__invoke(new ServiceManagerMock([
30
                'config' => ['mail_options' => []],
31
                ConfigMigrationService::class => new ConfigMigrationService()
32
            ]), '')
33
        );
34
    }
35
}
36