/** * @covers makinuk\ICalendar\ICalendar::saveToFile */ public function testSaveToFile() { $file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "icalOut.ics"; if (file_exists($file)) { unlink($file); } $event = new ICalEvent(); $event->setUId(1234)->setSummary("Summary")->setOrganizer(new ICalPerson("Mustafa AKIN", "*****@*****.**"))->setLocation("Istanbul")->setEndDate(strtotime("+26 hours"))->setStartDate(strtotime("+24 hours"))->setDescription("Description"); $this->object->addEvent($event); $this->object->saveToFile($file); $this->assertFileExists($file); }