diff --git a/tests/methods/UnparseTest.php b/tests/methods/UnparseTest.php index 60448dd..53bf0cc 100644 --- a/tests/methods/UnparseTest.php +++ b/tests/methods/UnparseTest.php @@ -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'); diff --git a/tests/rector.php b/tests/rector.php index 5878741..a896027 100644 --- a/tests/rector.php +++ b/tests/rector.php @@ -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);