コード例 #1
0
 public function testGetInternalIterator()
 {
     $data = array('bar1', 'bar2', 'bar3');
     $col = new PropelCollection($data);
     $it1 = $col->getInternalIterator();
     $it2 = $col->getINternalIterator();
     $this->assertSame($it1, $it2, 'getInternalIterator() returns always the same iterator');
     $col->getInternalIterator()->next();
     $this->assertEquals('bar2', $col->getInternalIterator()->current(), 'getInternalIterator() returns always the same iterator');
 }