Max out the number of iterations

This commit is contained in:
James Cole
2021-03-14 04:55:48 +01:00
parent fc4d4a455b
commit d82fe2ab4c
13 changed files with 23 additions and 19 deletions

View File

@@ -53,7 +53,8 @@ trait TestHelpers
// then loop and add fields:
$optionalSets = $startOptionalSets;
$keys = array_keys($optionalSets);
for ($i = 1; $i <= count($keys); $i++) {
$count = count($keys) > self::MAX_ITERATIONS ? self::MAX_ITERATIONS : count($keys);
for ($i = 1; $i <= $count; $i++) {
$combinations = $this->combinationsOf($i, $keys);
// expand body with N extra fields:
foreach ($combinations as $extraFields) {
@@ -71,6 +72,7 @@ trait TestHelpers
}
unset($second);
}
return $submissions;
}