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