Mercurial > hg > rc1
view vendor/sabre/vobject/tests/VObject/ElementListTest.php @ 26:b2b6c0af2383
remove _ from name, lots of other hacks to get label context menu working
| author | Charlie Root |
|---|---|
| date | Sun, 28 Jan 2018 11:32:20 -0500 |
| parents | 430dbd5346f7 |
| children |
line wrap: on
line source
<?php namespace Sabre\VObject; class ElementListTest extends \PHPUnit_Framework_TestCase { function testIterate() { $cal = new Component\VCalendar(); $sub = $cal->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); } }
