1--TEST--
2Create a vcard 2.1 with ORG and different 'phones'.
3--SKIPIF--
4<?php
5include_once 'Contact/Vcard/Build.php';
6if (!class_exists('Contact_Vcard_Build')) {
7    die('SKIP This test requires Contact_Vcard_Build.');
8}
9--FILE--
10<?php
11include_once 'Contact/Vcard/Build.php';
12$vcard = new Contact_Vcard_Build('2.1');
13
14$vcard = new Contact_Vcard_Build();
15$vcard->setFormattedName('Bar Foo');
16$vcard->setName('Bar', '', 'Foo', '', '');
17$vcard->setTitle('FOOBAR');
18$vcard->addOrganization('OHAI');
19
20$vcard->addEmail('foobar@example.org');
21
22$vcard->addTelephone('0900-foobar');
23$vcard->addParam('TYPE', 'work');
24
25$vcard->addTelephone('0900-foobar-cell');
26$vcard->addParam('TYPE', 'cell');
27
28$vcard->addTelephone('0900-foobar-fax');
29$vcard->addParam('TYPE', 'fax');
30
31var_dump($vcard->fetch());
32--EXPECT--
33string(205) "BEGIN:VCARD
34VERSION:3.0
35PROFILE:VCARD
36FN:Bar Foo
37N:Bar;;Foo;;
38TEL;TYPE=work:0900-foobar
39TEL;TYPE=cell:0900-foobar-cell
40TEL;TYPE=fax:0900-foobar-fax
41EMAIL:foobar@example.org
42TITLE:FOOBAR
43ORG:OHAI
44END:VCARD
45"
46