Newer Rector versions don’t have AddCoversClassAttributeRector anymore

https://github.com/rectorphp/rector-phpunit/pull/561/
This commit is contained in:
Christian Bläul
2026-02-02 15:58:26 +01:00
parent c47ba7934c
commit 6c0e74c89e
2 changed files with 8 additions and 4 deletions

View File

@@ -43,6 +43,9 @@ class UnparseTest extends Testcase {
$this->unparseAndCompare($expected);
}
/**
* @doesNotPerformAssertions
*/
public function testUnparseDefaultWithoutHeading() {
$this->csv->heading = false;
$this->csv->auto(__DIR__ . '/fixtures/auto-double-enclosure.csv');

View File

@@ -3,14 +3,15 @@
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddCoversClassAttributeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
use Rector\PHPUnit\PHPUnit60\Rector\ClassMethod\AddDoesNotPerformAssertionToNonAssertingTestRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DependsAnnotationWithValueToAttributeRector;
use \Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddCoversClassAttributeRector;
use Rector\PHPUnit\PHPUnit60\Rector\ClassMethod\AddDoesNotPerformAssertionToNonAssertingTestRector;
return static function(RectorConfig $rectorConfig): void {
$rectorConfig->rule(AddCoversClassAttributeRector::class);
if (class_exists(AddCoversClassAttributeRector::class)) {
$rectorConfig->rule(AddCoversClassAttributeRector::class);
}
$rectorConfig->rule(DataProviderAnnotationToAttributeRector::class);
$rectorConfig->rule(AddDoesNotPerformAssertionToNonAssertingTestRector::class);
$rectorConfig->rule(DependsAnnotationWithValueToAttributeRector::class);