Esempio n. 1
0
 /**
  * @dataProvider provideCollection
  */
 public function testNext(Collection $coll, array $elements)
 {
     while (true) {
         $collectionNext = $coll->next();
         $arrayNext = next($elements);
         if (!$collectionNext || !$arrayNext) {
             break;
         }
         $this->assertSame($arrayNext, $collectionNext, "Returned value of ArrayCollection::next() and next() not match");
         $this->assertSame(key($elements), $coll->key(), "Keys not match");
         $this->assertSame(current($elements), $coll->current(), "Current values not match");
     }
 }
 public function key()
 {
     return $this->coll->key();
 }
 /**
  * {@inheritDoc}
  */
 public function key()
 {
     $this->initialize();
     return $this->collection->key();
 }
 /**
  * {@inheritdoc}
  */
 public function key()
 {
     return $this->inner->key();
 }
 public function key()
 {
     return $this->_data->key();
 }