Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/vendor/sabre/vobject/tests/VObject/ElementListTest.php

33 lines
633 B

<?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);
}
}