mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-24 21:23:40 +00:00
32 lines
583 B
PHP
32 lines
583 B
PHP
<?php
|
|
|
|
namespace Sabre\VObject;
|
|
|
|
class ElementListTest extends \PHPUnit_Framework_TestCase {
|
|
|
|
function testIterate() {
|
|
|
|
$sub = new Component('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);
|
|
|
|
}
|
|
|
|
|
|
}
|