mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
remove method name on coversClass
This commit is contained in:
@ -26,10 +26,6 @@ final class Covers
|
||||
foreach ($method->covers as $covering) {
|
||||
if ($covering instanceof CoversClass) {
|
||||
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversClass({$covering->class}]";
|
||||
|
||||
if (!is_null($covering->method)) {
|
||||
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction('{$covering->method}']";
|
||||
}
|
||||
} else if ($covering instanceof CoversFunction) {
|
||||
$attributes[] = "#[\PHPUnit\Framework\Attributes\CoversFunction('{$covering->function}']";
|
||||
} else {
|
||||
|
||||
@ -9,7 +9,7 @@ namespace Pest\Factories\Covers;
|
||||
*/
|
||||
final class CoversClass
|
||||
{
|
||||
public function __construct(public string $class, public ?string $method = null)
|
||||
public function __construct(public string $class)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
@ -175,9 +175,8 @@ final class TestCall
|
||||
* Sets the covered class and method.
|
||||
*
|
||||
* @param class-string $class
|
||||
* @param string|null $method
|
||||
*/
|
||||
public function covers(string $class, ?string $method = null): TestCall
|
||||
public function covers(string $class): TestCall
|
||||
{
|
||||
$this->testCaseMethod->covers[] = new CoversClass(...func_get_args());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user