friendica-addons/dav/sabre-vobject/tests/Sabre/VObject/Issue154Test.php

30 lines
662 B
PHP
Raw Normal View History

2012-06-03 14:19:28 -04:00
<?php
namespace Sabre\VObject;
class Issue154Test extends \PHPUnit_Framework_TestCase {
2012-06-03 14:19:28 -04:00
function testStuff() {
$vcard = new Component('VCARD');
2012-06-03 14:19:28 -04:00
$vcard->VERSION = '3.0';
$vcard->PHOTO = base64_encode('random_stuff');
$vcard->PHOTO->add('BASE64',null);
$vcard->UID = 'foo-bar';
2012-06-03 14:19:28 -04:00
$result = $vcard->serialize();
$expected = array(
"BEGIN:VCARD",
"VERSION:3.0",
"PHOTO;BASE64:" . base64_encode('random_stuff'),
"UID:foo-bar",
"END:VCARD",
"",
);
$this->assertEquals(implode("\r\n", $expected), $result);
}
}