ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\Issue40Test Class Reference

This test is created to handle the issues brought forward by issue 40. More...

+ Inheritance diagram for Sabre\VObject\Issue40Test:
+ Collaboration diagram for Sabre\VObject\Issue40Test:

Public Member Functions

 testEncode ()
 

Detailed Description

This test is created to handle the issues brought forward by issue 40.

https://github.com/fruux/sabre-vobject/issues/40

Definition at line 12 of file Issue40Test.php.

Member Function Documentation

◆ testEncode()

Sabre\VObject\Issue40Test::testEncode ( )

Definition at line 14 of file Issue40Test.php.

References Sabre\VObject\Version\VERSION.

14  {
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  }
const VERSION
Full version number.
Definition: Version.php:17

The documentation for this class was generated from the following file: