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

EventSubscriberTest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
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