createComponent('VEVENT'); $elems = array( $sub, clone $sub, clone $sub ); $elemList = new ElementList($elems); $count = 0; foreach($elemList as $key=>$subcomponent) { $count++; $this->assertInstanceOf('Sabre\\VObject\\Component',$subcomponent); } $this->assertEquals(3,$count); $this->assertEquals(2,$key); } }