1<?php
2
3namespace Sabre\VObject\ICalendar;
4
5use Sabre\VObject\Reader;
6
7class AttachParseTest extends \PHPUnit_Framework_TestCase {
8
9    /**
10     * See issue #128 for more info.
11     */
12    function testParseAttach() {
13
14        $vcal = <<<ICS
15BEGIN:VCALENDAR
16BEGIN:VEVENT
17ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/reports/r-960812.ps
18END:VEVENT
19END:VCALENDAR
20ICS;
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}
32