1
0
mirror of https://github.com/halaxa/json-machine.git synced 2025-01-17 13:08:16 +01:00

Test with iterator_count()

This commit is contained in:
Filip Halaxa 2022-12-20 12:59:40 +01:00
parent 9f8c415b8a
commit fa261d2523

View File

@ -139,4 +139,11 @@ class ItemsTest extends \PHPUnit_Framework_TestCase
$this->assertSame(['/one', '/two'], $items->getJsonPointers());
}
public function testCountViaIteratorCount()
{
$items = Items::fromIterable(['{"results":', '[1,2,3]}'], ['pointer' => ['/results']]);
$this->assertSame(3, iterator_count($items));
}
}