/** * testGetChildrenWithSharedFolder * * @see 0011078: CalDav calender not working after upgrade from 2013.10 (postgresql) */ public function testGetChildrenWithSharedFolder() { $this->_getCalendarTestContainer(Tinebase_Model_Container::TYPE_SHARED); $calendarRoot = \Sabre\CalDAV\Plugin::CALENDAR_ROOT; $_SERVER['REQUEST_URI'] = '/tine20/' . $calendarRoot; $collection = new Calendar_Frontend_WebDAV($calendarRoot, true); $children = $collection->getChildren(); $this->assertTrue(is_array($children)); $this->assertTrue(count($children) > 0); $this->assertTrue($children[0] instanceof Calendar_Frontend_WebDAV); }
/** * test getChildren */ public function testGetChildren() { $_SERVER['HTTP_USER_AGENT'] = 'Mac_OS_X/10.9 (13A603) CalendarAgent/174'; $collection = new Calendar_Frontend_WebDAV(\Sabre\CalDAV\Plugin::CALENDAR_ROOT . '/' . Tinebase_Core::getUser()->contact_id, true); $children = $collection->getChildren(); $this->assertTrue($children[0] instanceof Calendar_Frontend_WebDAV_Container); $this->assertTrue(array_reduce($children, function ($result, $container) { return $result || $container instanceof Tasks_Frontend_WebDAV_Container; }, FALSE), 'tasks container is missing'); return $children; }
/** * @see 0012216: Caldav Directory calendars not found */ public function testCalendarRoot() { $calendarRoot = new Calendar_Frontend_WebDAV(\Sabre\CalDAV\Plugin::CALENDAR_ROOT, true); $children = $calendarRoot->getChildren(); $this->assertTrue(count($children) > 0 && $children[0] instanceof Calendar_Frontend_WebDAV); }