Page MenuHomePhabricator

ElementListTest.php
No OneTemporary

ElementListTest.php

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

File Metadata

Mime Type
text/x-php
Expires
Sun, Dec 22, 10:12 PM (2 d, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
915726
Default Alt Text
ElementListTest.php (633 B)

Event Timeline