diff --git a/src/Concerns/Testable.php b/src/Concerns/Testable.php index 806fb89a..82a0c166 100644 --- a/src/Concerns/Testable.php +++ b/src/Concerns/Testable.php @@ -241,7 +241,7 @@ trait Testable continue; } - if (in_array($testParameterTypes[$argumentIndex], [\Closure::class, 'callable', 'mixed'])) { + if (in_array($testParameterTypes[$argumentIndex], [Closure::class, 'callable', 'mixed'])) { continue; } @@ -255,7 +255,7 @@ trait Testable return $arguments; } - if (in_array($testParameterTypes[0], [\Closure::class, 'callable'])) { + if (in_array($testParameterTypes[0], [Closure::class, 'callable'])) { return $arguments; } @@ -291,7 +291,7 @@ trait Testable return; } - throw new DatasetArgsCountMismatch($this->dataName(), $requiredParametersCount, $suppliedParametersCount); + throw new DatasetArgsCountMismatch($requiredParametersCount, $suppliedParametersCount); } /** diff --git a/src/Exceptions/DatasetArgsCountMismatch.php b/src/Exceptions/DatasetArgsCountMismatch.php index 86fcd3f1..3f257f42 100644 --- a/src/Exceptions/DatasetArgsCountMismatch.php +++ b/src/Exceptions/DatasetArgsCountMismatch.php @@ -8,8 +8,8 @@ use 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)); } }