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

Public Member Functions

 testSetParts ()
 
 testGetParts ()
 
 testGetPartsNull ()
 

Detailed Description

Definition at line 8 of file CompoundTest.php.

Member Function Documentation

◆ testGetParts()

Sabre\VObject\Property\CompoundTest::testGetParts ( )

Definition at line 29 of file CompoundTest.php.

29 {
30
31 $str = 'ABC\, Inc.;North American Division;Marketing\;Sales';
32
33 $vcard = new VCard();
34 $elem = $vcard->createProperty('ORG');
35 $elem->setRawMimeDirValue($str);
36
37 $this->assertEquals(3, count($elem->getParts()));
38 $parts = $elem->getParts();
39 $this->assertEquals('Marketing;Sales', $parts[2]);
40 }
count()
Returns the number of elements.
Definition: Node.php:177

References Sabre\VObject\Node\count().

+ Here is the call graph for this function:

◆ testGetPartsNull()

Sabre\VObject\Property\CompoundTest::testGetPartsNull ( )

Definition at line 42 of file CompoundTest.php.

42 {
43
44 $vcard = new VCard();
45 $elem = $vcard->createProperty('ORG', null);
46
47 $this->assertEquals(0, count($elem->getParts()));
48
49 }

References Sabre\VObject\Node\count().

+ Here is the call graph for this function:

◆ testSetParts()

Sabre\VObject\Property\CompoundTest::testSetParts ( )

Definition at line 10 of file CompoundTest.php.

10 {
11
12 $arr = [
13 'ABC, Inc.',
14 'North American Division',
15 'Marketing;Sales',
16 ];
17
18 $vcard = new VCard();
19 $elem = $vcard->createProperty('ORG');
20 $elem->setParts($arr);
21
22 $this->assertEquals('ABC\, Inc.;North American Division;Marketing\;Sales', $elem->getValue());
23 $this->assertEquals(3, count($elem->getParts()));
24 $parts = $elem->getParts();
25 $this->assertEquals('Marketing;Sales', $parts[2]);
26
27 }

References Sabre\VObject\Node\count().

+ Here is the call graph for this function:

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