Definition at line 8 of file CompoundTest.php.
◆ 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.
References Sabre\VObject\Node\count().
◆ testGetPartsNull()
Sabre\VObject\Property\CompoundTest::testGetPartsNull |
( |
| ) |
|
◆ 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().
The documentation for this class was generated from the following file: