/** * @dataProvider providesCalendarQueryParameters */ public function testCalendarQuery($expectedEventsInResult, $propFilters, $compFilter) { $calendarId = $this->createTestCalendar(); $events = []; $events[0] = $this->createEvent($calendarId, '20130912T130000Z', '20130912T140000Z'); $events[1] = $this->createEvent($calendarId, '20130912T150000Z', '20130912T170000Z'); $events[2] = $this->createEvent($calendarId, '20130912T173000Z', '20130912T220000Z'); $result = $this->backend->calendarQuery($calendarId, ['name' => '', 'prop-filters' => $propFilters, 'comp-filters' => $compFilter]); $expectedEventsInResult = array_map(function ($index) use($events) { return $events[$index]; }, $expectedEventsInResult); $this->assertEquals($expectedEventsInResult, $result, '', 0.0, 10, true); }