2012-06-03 20:19:28 +02:00
|
|
|
<?php
|
|
|
|
|
2012-08-11 10:07:19 +02:00
|
|
|
namespace Sabre\VObject;
|
|
|
|
|
|
|
|
class Issue154Test extends \PHPUnit_Framework_TestCase {
|
2012-06-03 20:19:28 +02:00
|
|
|
|
|
|
|
function testStuff() {
|
|
|
|
|
2012-08-11 10:07:19 +02:00
|
|
|
$vcard = new Component('VCARD');
|
2012-06-03 20:19:28 +02:00
|
|
|
$vcard->VERSION = '3.0';
|
|
|
|
$vcard->PHOTO = base64_encode('random_stuff');
|
|
|
|
$vcard->PHOTO->add('BASE64',null);
|
2012-07-23 23:15:47 +02:00
|
|
|
$vcard->UID = 'foo-bar';
|
2012-06-03 20:19:28 +02: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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|