Completed
Push — develop ( 828103 )
by Jáchym
20:34
created

EventSubscriberTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 3
dl 0
loc 46
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getConfigFiles() 0 7 1
A setUp() 0 6 1
1
<?php
2
3
namespace Zenify\DoctrineMigrations\Tests\EventSubscriber;
4
5
use Nette\DI\Container;
6
use PHPUnit_Framework_TestCase;
7
use Symfony\Component\Console\Application;
8
use Zenify\DoctrineMigrations\Tests\ContainerFactory;
9
10
11
abstract class EventSubscriberTest extends PHPUnit_Framework_TestCase
12
{
13
14
    /**
15
     * @var array
16
     */
17
    private $data;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
18
19
    /**
20
     * @var Container
21
     */
22
    protected $container;
23
24
	/**
25
	 * @var Application
26
	 */
27
	protected $application;
28
29
30
    public function __construct($name = null, array $data = [], $dataName = '')
31
    {
32
        parent::__construct($name, $data, $dataName);
33
34
        $this->data = $data;
35
    }
36
37
38
    /**
39
     * Data provider for all tests.
40
     */
41
    public function getConfigFiles()
42
    {
43
        return [
44
            [__DIR__ . '/../config/default.neon'],
45
            [__DIR__ . '/../config/symnedi.neon'],
46
        ];
47
    }
48
49
    protected function setUp()
50
	{
51
		$container = (new ContainerFactory)->createWithConfig($this->data);
52
		$this->container = $container;
53
        $this->application = $container->getByType(Application::class);
54
    }
55
56
}
57