public function testPhoto()
{
$image = __DIR__ . '/image.jpg';
$imageUrl = 'https://raw.githubusercontent.com/jeroendesloovere/vcard/master/tests/image.jpg';
$vcard = new VCard();
$vcard->addPhoto($image, true);
$parser = new VCardParser($vcard->buildVCard());
$this->assertEquals($parser->getCardAtIndex(0)->rawPhoto, file_get_contents($image));
$vcard = new VCard();
$vcard->addPhoto($image, false);
$parser = new VCardParser($vcard->buildVCard());
$this->assertEquals($parser->getCardAtIndex(0)->photo, __DIR__ . '/image.jpg');
$vcard = new VCard();
$vcard->addPhoto($imageUrl, false);
$parser = new VCardParser($vcard->buildVCard());
$this->assertEquals($parser->getCardAtIndex(0)->photo, $imageUrl);
}