File: ElementListTest.php

package info (click to toggle)
php-sabre-vobject 2.1.7-6.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,172 kB
  • sloc: php: 6,487; makefile: 17; xml: 16
file content (32 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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);

    }


}