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