mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 18:27:23 +01:00
remove dataset name from DatasetArgsCountMismatch
This commit is contained in:
@ -241,7 +241,7 @@ trait Testable
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($testParameterTypes[$argumentIndex], [\Closure::class, 'callable', 'mixed'])) {
|
if (in_array($testParameterTypes[$argumentIndex], [Closure::class, 'callable', 'mixed'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ trait Testable
|
|||||||
return $arguments;
|
return $arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($testParameterTypes[0], [\Closure::class, 'callable'])) {
|
if (in_array($testParameterTypes[0], [Closure::class, 'callable'])) {
|
||||||
return $arguments;
|
return $arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ trait Testable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new DatasetArgsCountMismatch($this->dataName(), $requiredParametersCount, $suppliedParametersCount);
|
throw new DatasetArgsCountMismatch($requiredParametersCount, $suppliedParametersCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,8 +8,8 @@ use Exception;
|
|||||||
|
|
||||||
final class DatasetArgsCountMismatch extends Exception
|
final class DatasetArgsCountMismatch extends Exception
|
||||||
{
|
{
|
||||||
public function __construct(string $dataName, int $requiredCount, int $suppliedCount)
|
public function __construct(int $requiredCount, int $suppliedCount)
|
||||||
{
|
{
|
||||||
parent::__construct(sprintf('Test expects %d arguments but dataset [%s] only provides %d', $requiredCount, $dataName, $suppliedCount));
|
parent::__construct(sprintf('Test expects %d arguments but dataset only provides %d', $requiredCount, $suppliedCount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user