assertSame(["abc", "foo", "bar"], wait(Iterator\toArray($iterator))); } public function testEmpty() { $iterator = Iterator\fromIterable([], 5); $this->assertSame([], wait(Iterator\toArray($iterator))); } }