diff options
Diffstat (limited to 'vendor/sabre/vobject/tests/Sabre/VObject/Issue154Test.php')
-rw-r--r-- | vendor/sabre/vobject/tests/Sabre/VObject/Issue154Test.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/sabre/vobject/tests/Sabre/VObject/Issue154Test.php b/vendor/sabre/vobject/tests/Sabre/VObject/Issue154Test.php new file mode 100644 index 000000000..ed9c7c3f4 --- /dev/null +++ b/vendor/sabre/vobject/tests/Sabre/VObject/Issue154Test.php @@ -0,0 +1,29 @@ +<?php + +namespace Sabre\VObject; + +class Issue154Test extends \PHPUnit_Framework_TestCase { + + function testStuff() { + + $vcard = new Component('VCARD'); + $vcard->VERSION = '3.0'; + $vcard->PHOTO = base64_encode('random_stuff'); + $vcard->PHOTO->add('BASE64',null); + $vcard->UID = 'foo-bar'; + + $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); + + } + +} |