예제 #1
0
 public function testListIterator()
 {
     // Remove the following lines when you implement this test.
     $it = $this->object->listIterator();
     $this->assertTrue($it instanceof \Iterator);
     $i = 0;
     $assert = false;
     foreach ($this->object as $val) {
         $assert = true;
         $this->assertTrue($val->toNative() == $i);
         $i++;
     }
     $this->assertTrue($assert);
     $it->next();
     $this->assertTrue($it->current()->toNative() === 1);
     $it->next();
     $it->next();
     $it->next();
     $it->remove();
 }