ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Issue40Test.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\VObject;
4
5use PHPUnit\Framework\TestCase;
6
12class Issue40Test extends TestCase {
13
14 function testEncode() {
15
16 $card = new Component\VCard();
17 $card->add('N', ['van der Harten', ['Rene', 'J.'], "", 'Sir', 'R.D.O.N.'], ['SORT-AS' => ['Harten', 'Rene']]);
18
19 unset($card->UID);
20
21 $expected = implode("\r\n", [
22 "BEGIN:VCARD",
23 "VERSION:4.0",
24 "PRODID:-//Sabre//Sabre VObject " . Version::VERSION . '//EN',
25 "N;SORT-AS=Harten,Rene:van der Harten;Rene,J.;;Sir;R.D.O.N.",
26 "END:VCARD",
27 ""
28 ]);
29
30 $this->assertEquals($expected, $card->serialize());
31
32 }
33
34}
An exception for terminatinating execution or to throw for unit testing.
This test is created to handle the issues brought forward by issue 40.
Definition: Issue40Test.php:12
const VERSION
Full version number.
Definition: Version.php:17