rector/tests/AbstractContainerAwareTestCase.php

28 lines
645 B
PHP
Raw Normal View History

2017-08-18 22:59:59 +02:00
<?php declare(strict_types=1);
namespace Rector\Tests;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Rector\DependencyInjection\ContainerFactory;
abstract class AbstractContainerAwareTestCase extends TestCase
{
/**
* @var ContainerInterface
*/
protected $container;
/**
* Constructs a test case with the given name.
*
* @param mixed[] $data
*/
2017-08-20 01:02:11 +02:00
public function __construct(?string $name = null, array $data = [], string $dataName = '')
2017-08-18 22:59:59 +02:00
{
parent::__construct($name, $data, $dataName);
2017-11-25 02:36:19 +01:00
$this->container = (new ContainerFactory())->create();
2017-08-18 22:59:59 +02:00
}
}