fix: datasets with a single named argument (#1894)

This commit is contained in:
Lazizbek Ergashev
2026-09-08 20:42:15 +05:00
committed by GitHub
parent e68976ea9d
commit 2440001cfc
4 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -187,8 +187,8 @@ final class TestCaseMethodFactory
$attributesCode
public function $methodName(...\$arguments)
{
if (count(\$arguments) === 1 && \$arguments[0] instanceof __PestDatasetProviderError) {
throw \$arguments[0]->getPrevious() ?? \$arguments[0];
if (count(\$arguments) === 1 && \$arguments[array_key_first(\$arguments)] instanceof __PestDatasetProviderError) {
throw \$arguments[array_key_first(\$arguments)]->getPrevious() ?? \$arguments[array_key_first(\$arguments)];
}
return \$this->__runTest(