We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4655cb0 commit 0937cb7Copy full SHA for 0937cb7
1 file changed
tests/NestedSetsBehaviorTest.php
@@ -2316,12 +2316,12 @@ public function testChildrenMethodRequiresOrderByForCorrectTreeTraversal(): void
2316
'Children list should contain exactly 3 elements.',
2317
);
2318
2319
- for ($i = 0; $i < 3; $i++) {
2320
- if (isset($childrenList[$i]) === true) {
+ foreach ($childrenList as $index => $child) {
+ if (isset($expectedOrder[$index])) {
2321
self::assertEquals(
2322
- $expectedOrder[$i],
2323
- $childrenList[$i]->getAttribute('name'),
2324
- "Child at index {$i} should be {$expectedOrder[$i]} in correct \'lft\' order.",
+ $expectedOrder[$index],
+ $child->getAttribute('name'),
+ "Child at index {$index} should be {$expectedOrder[$index]} in correct \'lft\' order.",
2325
2326
}
2327
0 commit comments