rector/tests/AbstractContainerAwareTestCase.php

30 lines
700 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 string $name
* @param mixed[] $data
* @param string $dataName
*/
public function __construct(string $name = null, array $data = [], string $dataName = '')
2017-08-18 22:59:59 +02:00
{
parent::__construct($name, $data, $dataName);
$this->container = (new ContainerFactory)->create();
}
}