ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\ElementListTest Class Reference
+ Inheritance diagram for Sabre\VObject\ElementListTest:
+ Collaboration diagram for Sabre\VObject\ElementListTest:

Public Member Functions

 testIterate ()
 

Detailed Description

Definition at line 7 of file ElementListTest.php.

Member Function Documentation

◆ testIterate()

Sabre\VObject\ElementListTest::testIterate ( )

Definition at line 9 of file ElementListTest.php.

References $key.

9  {
10 
11  $cal = new Component\VCalendar();
12  $sub = $cal->createComponent('VEVENT');
13 
14  $elems = [
15  $sub,
16  clone $sub,
17  clone $sub
18  ];
19 
20  $elemList = new ElementList($elems);
21 
22  $count = 0;
23  foreach ($elemList as $key => $subcomponent) {
24 
25  $count++;
26  $this->assertInstanceOf('Sabre\\VObject\\Component', $subcomponent);
27 
28  }
29  $this->assertEquals(3, $count);
30  $this->assertEquals(2, $key);
31 
32  }
$key
Definition: croninfo.php:18

The documentation for this class was generated from the following file: