rector/tests/AbstractContainerAwareTestCase.php
TomasVotruba 4c052d0ceb cleanup
2017-08-20 01:02:11 +02:00

28 lines
643 B
PHP

<?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
*/
public function __construct(?string $name = null, array $data = [], string $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->container = (new ContainerFactory)->create();
}
}