mirror of
https://github.com/pestphp/pest.git
synced 2026-12-03 22:45:06 +01:00
20 lines
597 B
PHP
20 lines
597 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Exceptions;
|
|
|
|
use Exception;
|
|
|
|
final class DatasetArgumentsMismatch extends Exception
|
|
{
|
|
public function __construct(int $requiredCount, int $suppliedCount)
|
|
{
|
|
if ($requiredCount <= $suppliedCount) {
|
|
parent::__construct('The test arguments do not match the dataset keys. Please make sure each argument is named after a key in the dataset.');
|
|
} else {
|
|
parent::__construct(sprintf('The test expects [%d] argument(s), but the dataset only provides [%d].', $requiredCount, $suppliedCount));
|
|
}
|
|
}
|
|
}
|