7
|
1 <?php
|
|
2
|
|
3 namespace Sabre\VObject\ICalendar;
|
|
4
|
|
5 use Sabre\VObject\Reader;
|
|
6
|
|
7 class AttachParseTest extends \PHPUnit_Framework_TestCase {
|
|
8
|
|
9 /**
|
|
10 * See issue #128 for more info.
|
|
11 */
|
|
12 function testParseAttach() {
|
|
13
|
|
14 $vcal = <<<ICS
|
|
15 BEGIN:VCALENDAR
|
|
16 BEGIN:VEVENT
|
|
17 ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/reports/r-960812.ps
|
|
18 END:VEVENT
|
|
19 END:VCALENDAR
|
|
20 ICS;
|
|
21
|
|
22 $vcal = Reader::read($vcal);
|
|
23 $prop = $vcal->VEVENT->ATTACH;
|
|
24
|
|
25 $this->assertInstanceOf('Sabre\\VObject\\Property\\URI', $prop);
|
|
26 $this->assertEquals('ftp://example.com/pub/reports/r-960812.ps', $prop->getValue());
|
|
27
|
|
28
|
|
29 }
|
|
30
|
|
31 }
|