Skip to content

Commit fa261d2

Browse files
committed
Test with iterator_count()
1 parent 9f8c415 commit fa261d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/JsonMachineTest/ItemsTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,11 @@ public function testGetJsonPointers()
139139

140140
$this->assertSame(['/one', '/two'], $items->getJsonPointers());
141141
}
142+
143+
public function testCountViaIteratorCount()
144+
{
145+
$items = Items::fromIterable(['{"results":', '[1,2,3]}'], ['pointer' => ['/results']]);
146+
147+
$this->assertSame(3, iterator_count($items));
148+
}
142149
}

0 commit comments

Comments
 (0)