Skip to content

Commit 3f6fef6

Browse files
committed
fix: use IteratorIterator as suggested by @stof
1 parent f1db5be commit 3f6fef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Knp/Menu/Tests/Iterator/CurrentItemFilterIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testSimpleFiltering(): void
2121

2222
$names = [];
2323
// FilterIterator expects an Iterator implementation explicitly, not an IteratorAggregate.
24-
$iterator = new CurrentItemFilterIterator(new \ArrayIterator($menu->getChildren()), new Matcher());
24+
$iterator = new CurrentItemFilterIterator(new \IteratorIterator($this->menu), new Matcher());
2525

2626
foreach ($iterator as $value) {
2727
$names[] = $value->getName();

0 commit comments

Comments
 (0)