mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-20 08:05:29 +01:00
30 lines
754 B
PHP
30 lines
754 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Rector\Tests;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psr\Container\ContainerInterface;
|
|
use Rector\DependencyInjection\ContainerFactory;
|
|
|
|
abstract class AbstractConfigurableContainerAwareTestCase 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 = '')
|
|
{
|
|
$this->container = (new ContainerFactory())->createWithConfigFiles([$this->provideConfig()]);
|
|
|
|
parent::__construct($name, $data, $dataName);
|
|
}
|
|
|
|
abstract protected function provideConfig(): string;
|
|
}
|