pass methods name to attribute surrounded by quotes

This commit is contained in:
danilopolani
2022-03-05 16:51:12 +01:00
parent 2465b88462
commit a894386b49

View File

@ -28,10 +28,10 @@ final class Covers
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversClass({$covering->class}]";
if (!is_null($covering->method)) {
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction({$covering->method}]";
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction('{$covering->method}']";
}
} else if ($covering instanceof CoversFunction) {
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction({$covering->function}]";
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction('{$covering->function}']";
} else {
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversNothing]";
}