From e60d08a0410a0f03f03f9e4d9202c468d1393980 Mon Sep 17 00:00:00 2001 From: Moslem Deris Date: Tue, 26 Nov 2024 18:06:15 +0330 Subject: [PATCH] add `CoversNothing` attribute --- src/Generator/Commands/MigrationGenerator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Generator/Commands/MigrationGenerator.php b/src/Generator/Commands/MigrationGenerator.php index 8673d8912..1ae555dd4 100644 --- a/src/Generator/Commands/MigrationGenerator.php +++ b/src/Generator/Commands/MigrationGenerator.php @@ -98,12 +98,15 @@ protected function getTestContent(): string // imports $parentUnitTestCaseFullPath = "App\Containers\\$this->sectionName\\$this->containerName\Tests\UnitTestCase"; $namespace->addUse($parentUnitTestCaseFullPath); + $coversNothingAttributeFullPath = 'PHPUnit\Framework\Attributes\CoversNothing'; + $namespace->addUse($coversNothingAttributeFullPath); // class $class = $file->addNamespace($namespace) ->addClass('MigrationTest') ->setFinal() - ->setExtends($parentUnitTestCaseFullPath); + ->setExtends($parentUnitTestCaseFullPath) + ->addAttribute($coversNothingAttributeFullPath); // test method $testMethod = $class->addMethod('test' . ucfirst($this->table) . 'TableHasExpectedColumns')->setPublic();