Skip to content

Commit 3a6483d

Browse files
committed
Ensure unique data set names in createOptionDataProvider
1 parent 93050fb commit 3a6483d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/TestCase.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,14 @@ protected function createOptionDataProvider(array $options): array
166166
{
167167
$data = [];
168168

169-
// Loop through each option and get possible values
170169
foreach ($options as $option => $values) {
171-
// Create an option array with a named data provider for each value
172170
foreach ($values as $key => $value) {
171+
$dataKey = $option . '_' . $key;
173172
if (is_int($key)) {
174-
$key = get_debug_type($value);
173+
$dataKey .= '_' . get_debug_type($value);
175174
}
176175

177-
$data[$option . '_' . $key] = [[$option => $value]];
176+
$data[$dataKey] = [[$option => $value]];
178177
}
179178
}
180179

0 commit comments

Comments
 (0)