mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-27 03:40:16 +00:00
30 lines
596 B
PHP
30 lines
596 B
PHP
<?php
|
|
|
|
class Sabre_VObject_ElementListTest extends PHPUnit_Framework_TestCase {
|
|
|
|
function testIterate() {
|
|
|
|
$sub = new Sabre_VObject_Component('VEVENT');
|
|
|
|
$elems = array(
|
|
$sub,
|
|
clone $sub,
|
|
clone $sub
|
|
);
|
|
|
|
$elemList = new Sabre_VObject_ElementList($elems);
|
|
|
|
$count = 0;
|
|
foreach($elemList as $key=>$subcomponent) {
|
|
|
|
$count++;
|
|
$this->assertInstanceOf('Sabre_VObject_Component',$subcomponent);
|
|
|
|
}
|
|
$this->assertEquals(3,$count);
|
|
$this->assertEquals(2,$key);
|
|
|
|
}
|
|
|
|
|
|
}
|