Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1820831
Issue40Test.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Size
801 B
Subscribers
None
Issue40Test.php
View Options
<?php
namespace
Sabre\VObject
;
/**
* This test is created to handle the issues brought forward by issue 40.
*
* https://github.com/fruux/sabre-vobject/issues/40
*/
class
Issue40Test
extends
\PHPUnit_Framework_TestCase
{
function
testEncode
()
{
$card
=
new
Component\VCard
();
$card
->
add
(
'N'
,
array
(
'van der Harten'
,
array
(
'Rene'
,
'J.'
),
""
,
'Sir'
,
'R.D.O.N.'
),
array
(
'SORT-AS'
=>
array
(
'Harten'
,
'Rene'
)));
$expected
=
implode
(
"
\r\n
"
,
array
(
"BEGIN:VCARD"
,
"VERSION:3.0"
,
"PRODID:-//Sabre//Sabre VObject "
.
Version
::
VERSION
.
'//EN'
,
"N;SORT-AS=Harten,Rene:van der Harten;Rene,J.;;Sir;R.D.O.N."
,
"END:VCARD"
,
""
));
$this
->
assertEquals
(
$expected
,
$card
->
serialize
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Dec 22, 4:20 PM (3 d, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
915744
Default Alt Text
Issue40Test.php (801 B)
Attached To
rDAVCAL DokuWiki DAVCal PlugIn
Event Timeline
Log In to Comment