add covers list and attributes mutator

This commit is contained in:
danilopolani
2022-03-05 16:23:05 +01:00
parent 7660517f7c
commit 2465b88462
7 changed files with 96 additions and 17 deletions

View File

@ -35,6 +35,15 @@ final class TestCaseFactory
Annotations\Groups::class,
];
/**
* The list of annotations.
*
* @var array<int, class-string>
*/
private static array $attributes = [
Attributes\Covers::class,
];
/**
* The FQN of the Test Case class.
*
@ -142,7 +151,7 @@ final class TestCaseFactory
}
$methodsCode = implode('', array_map(
fn (TestCaseMethodFactory $methodFactory) => $methodFactory->buildForEvaluation($classFQN, self::$annotations),
fn (TestCaseMethodFactory $methodFactory) => $methodFactory->buildForEvaluation($classFQN, self::$annotations, self::$attributes),
$methods
));