GoogleColonEscapingTest.php 617 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Sabre\VObject;
  3. /**
  4. * Google produces vcards with a weird escaping of urls.
  5. *
  6. * VObject will provide a workaround for this, so end-user still get expected
  7. * values.
  8. */
  9. class GoogleColonEscaping extends \PHPUnit_Framework_TestCase {
  10. function testDecode() {
  11. $vcard = <<<VCF
  12. BEGIN:VCARD
  13. VERSION:3.0
  14. FN:Evert Pot
  15. N:Pot;Evert;;;
  16. EMAIL;TYPE=INTERNET;TYPE=WORK:evert@fruux.com
  17. BDAY:1985-04-07
  18. item7.URL:http\://www.rooftopsolutions.nl/
  19. END:VCARD
  20. VCF;
  21. $vobj = Reader::read($vcard);
  22. $this->assertEquals('http://www.rooftopsolutions.nl/', $vobj->URL->getValue());
  23. }
  24. }