diff --git a/src/Framework/functions.php b/src/Framework/functions.php index a26f0499..2cb4f61c 100644 --- a/src/Framework/functions.php +++ b/src/Framework/functions.php @@ -9,6 +9,10 @@ function test(string $description, Closure $closure): void { + if (($count = func_num_args()) > 2) { + throw new \Exception(__FUNCTION__ . "() expects 2 parameter, $count given."); + } + if ($fn = (new ReflectionFunction('setUp'))->getStaticVariables()['fn']) { $fn(); }