From a894386b49d1b02e12b54d5788db16ecd0987e6d Mon Sep 17 00:00:00 2001 From: danilopolani Date: Sat, 5 Mar 2022 16:51:12 +0100 Subject: [PATCH] pass methods name to attribute surrounded by quotes --- src/Factories/Attributes/Covers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Factories/Attributes/Covers.php b/src/Factories/Attributes/Covers.php index 946bd1fd..a965ca21 100644 --- a/src/Factories/Attributes/Covers.php +++ b/src/Factories/Attributes/Covers.php @@ -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]"; }