fix: add repeat iteration as the last argument when combined with dataset

This commit is contained in:
Katalam
2023-10-06 15:07:48 +02:00
parent 3ee5c29a00
commit ecff90da1c
2 changed files with 29 additions and 5 deletions

View File

@ -262,8 +262,9 @@ trait Testable
{
$method = TestSuite::getInstance()->tests->get(self::$__filename)->getMethod($this->name());
if ($method->repetitions > 1 && $method->datasets !== []) {
array_shift($arguments);
if ($method->repetitions > 1) {
$firstArgument = array_shift($arguments);
$arguments[] = $firstArgument;
}
$underlyingTest = Reflection::getFunctionVariable($this->__test, 'closure');