mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
22 lines
521 B
PHP
22 lines
521 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('Test argument names and dataset keys do not match');
|
|
} else {
|
|
parent::__construct(sprintf('Test expects %d arguments but dataset only provides %d', $requiredCount, $suppliedCount));
|
|
}
|
|
}
|
|
|
|
//
|
|
}
|