function testGet() { $children = $this->calendar->getChildren(); $this->assertTrue($children[0] instanceof Sabre_CalDAV_CalendarObject); $obj = $children[0]; $expected = "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Apple Inc.//iCal 4.0.1//EN\nCALSCALE:GREGORIAN\nBEGIN:VTIMEZONE\nTZID:Asia/Seoul\nBEGIN:DAYLIGHT\nTZOFFSETFROM:+0900\nRRULE:FREQ=YEARLY;UNTIL=19880507T150000Z;BYMONTH=5;BYDAY=2SU\nDTSTART:19870510T000000\nTZNAME:GMT+09:00\nTZOFFSETTO:+1000\nEND:DAYLIGHT\nBEGIN:STANDARD\nTZOFFSETFROM:+1000\nDTSTART:19881009T000000\nTZNAME:GMT+09:00\nTZOFFSETTO:+0900\nEND:STANDARD\nEND:VTIMEZONE\nBEGIN:VEVENT\nCREATED:20100225T154229Z\nUID:39A6B5ED-DD51-4AFE-A683-C35EE3749627\nTRANSP:TRANSPARENT\nSUMMARY:Something here\nDTSTAMP:20100228T130202Z\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDTEND;TZID=Asia/Seoul:20100223T070000\nATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:lisa@example.com\nSEQUENCE:2\nEND:VEVENT\nEND:VCALENDAR"; $this->assertEquals($expected, $obj->get()); }
/** * @depends testGetChildren */ function testChildExists() { $this->assertFalse($this->calendar->childExists('foo')); $children = $this->calendar->getChildren(); $this->assertTrue($this->calendar->childExists($children[0]->getName())); }