Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/vendor/sabre/vobject/tests/VObject/Issue40Test.php

30 lines
801 B

<?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());
}
}