1<?php
2
3namespace Sabre\VObject\Property;
4
5use Sabre\VObject\Reader;
6
7class UriTest extends \PHPUnit_Framework_TestCase {
8
9    function testAlwaysEncodeUriVCalendar() {
10
11        // Apple iCal has issues with URL properties that don't have
12        // VALUE=URI specified. We added a workaround to vobject that
13        // ensures VALUE=URI always appears for these.
14        $input = <<<ICS
15BEGIN:VCALENDAR
16VERSION:2.0
17BEGIN:VEVENT
18URL:http://example.org/
19END:VEVENT
20END:VCALENDAR
21ICS;
22        $output = Reader::read($input)->serialize();
23        $this->assertContains('URL;VALUE=URI:http://example.org/', $output);
24
25    }
26
27}
28