comparison vendor/sabre/vobject/tests/VObject/VCard21Test.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
comparison
equal deleted inserted replaced
6:cec75ba50afc 7:430dbd5346f7
1 <?php
2
3 namespace Sabre\VObject;
4
5 /**
6 * Assorted vcard 2.1 tests.
7 */
8 class VCard21Test extends \PHPUnit_Framework_TestCase {
9
10 function testPropertyWithNoName() {
11
12 $input = <<<VCF
13 BEGIN:VCARD\r
14 VERSION:2.1\r
15 EMAIL;HOME;WORK:evert@fruux.com\r
16 END:VCARD\r
17
18 VCF;
19
20 $vobj = Reader::read($input);
21 $output = $vobj->serialize($input);
22
23 $this->assertEquals($input, $output);
24
25 }
26
27 function testPropertyPadValueCount() {
28
29 $input = <<<VCF
30 BEGIN:VCARD
31 VERSION:2.1
32 N:Foo
33 END:VCARD
34
35 VCF;
36
37 $vobj = Reader::read($input);
38 $output = $vobj->serialize($input);
39
40 $expected = <<<VCF
41 BEGIN:VCARD\r
42 VERSION:2.1\r
43 N:Foo;;;;\r
44 END:VCARD\r
45
46 VCF;
47
48
49 $this->assertEquals($expected, $output);
50
51 }
52 }