Exemplo n.º 1
0
 /**
  * @depends testSetup
  */
 function testCalendarQuery()
 {
     $backend = new CalDAV\Backend\MockScheduling();
     $inbox = new Inbox($backend, 'principals/user1');
     $this->assertEquals(0, count($inbox->getChildren()));
     $backend->createSchedulingObject('principals/user1', 'schedule1.ics', "BEGIN:VCALENDAR\r\nEND:VCALENDAR");
     $this->assertEquals(['schedule1.ics'], $inbox->calendarQuery(['name' => 'VCALENDAR', 'comp-filters' => [], 'prop-filters' => [], 'is-not-defined' => false]));
 }
 function testGetRefetch()
 {
     $backend = new Backend\MockScheduling();
     $backend->createSchedulingObject('principals/user1', 'foo', 'foo');
     $obj = new SchedulingObject($backend, ['calendarid' => 1, 'uri' => 'foo', 'principaluri' => 'principals/user1']);
     $this->assertEquals('foo', $obj->get());
 }