rector/tests/Validation/Collector/EmptyConfigurableRectorCollector/NotConfigurableRectorTest.php
Tomas Votruba 20291b25c8
Upgrade to Symplify not using symfony/http-kernel (#1119)
* trigger CI

* upgrade to symplify configs instead of bundles

* update config files infos to config files

* use ConfigureCallMerginLoaderFactory

* remove symfony/http-kernel

* remove symplify/phpstan-twig-rules
2021-11-01 14:20:45 +01:00

32 lines
965 B
PHP

<?php
declare(strict_types=1);
namespace Rector\Core\Tests\Validation\Collector\EmptyConfigurableRectorCollector;
use Rector\Core\Validation\Collector\EmptyConfigurableRectorCollector;
use Rector\Privatization\Rector\Class_\ChangeLocalPropertyToVariableRector;
use Rector\Testing\PHPUnit\AbstractTestCase;
/**
* Not configurable will be passed
*/
final class NotConfigurableRectorTest extends AbstractTestCase
{
private EmptyConfigurableRectorCollector $collector;
protected function setUp(): void
{
$this->bootFromConfigFiles([__DIR__ . '/config/not_configurable.php']);
$this->collector = $this->getService(EmptyConfigurableRectorCollector::class);
}
public function test(): void
{
$emptyConfigurableRectors = $this->collector->resolveEmptyConfigurable(
[$this->getService(ChangeLocalPropertyToVariableRector::class)]
);
$this->assertCount(0, $emptyConfigurableRectors);
}
}