@@ -6,397 +6,397 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\DAV\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 11 | - 'OCA\\DAV\\AppInfo\\PluginManager' => $baseDir . '/../lib/AppInfo/PluginManager.php', |
|
| 12 | - 'OCA\\DAV\\Avatars\\AvatarHome' => $baseDir . '/../lib/Avatars/AvatarHome.php', |
|
| 13 | - 'OCA\\DAV\\Avatars\\AvatarNode' => $baseDir . '/../lib/Avatars/AvatarNode.php', |
|
| 14 | - 'OCA\\DAV\\Avatars\\RootCollection' => $baseDir . '/../lib/Avatars/RootCollection.php', |
|
| 15 | - 'OCA\\DAV\\BackgroundJob\\BuildReminderIndexBackgroundJob' => $baseDir . '/../lib/BackgroundJob/BuildReminderIndexBackgroundJob.php', |
|
| 16 | - 'OCA\\DAV\\BackgroundJob\\CalendarRetentionJob' => $baseDir . '/../lib/BackgroundJob/CalendarRetentionJob.php', |
|
| 17 | - 'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => $baseDir . '/../lib/BackgroundJob/CleanupDirectLinksJob.php', |
|
| 18 | - 'OCA\\DAV\\BackgroundJob\\CleanupInvitationTokenJob' => $baseDir . '/../lib/BackgroundJob/CleanupInvitationTokenJob.php', |
|
| 19 | - 'OCA\\DAV\\BackgroundJob\\CleanupOrphanedChildrenJob' => $baseDir . '/../lib/BackgroundJob/CleanupOrphanedChildrenJob.php', |
|
| 20 | - 'OCA\\DAV\\BackgroundJob\\DeleteOutdatedSchedulingObjects' => $baseDir . '/../lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php', |
|
| 21 | - 'OCA\\DAV\\BackgroundJob\\EventReminderJob' => $baseDir . '/../lib/BackgroundJob/EventReminderJob.php', |
|
| 22 | - 'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => $baseDir . '/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 23 | - 'OCA\\DAV\\BackgroundJob\\OutOfOfficeEventDispatcherJob' => $baseDir . '/../lib/BackgroundJob/OutOfOfficeEventDispatcherJob.php', |
|
| 24 | - 'OCA\\DAV\\BackgroundJob\\PruneOutdatedSyncTokensJob' => $baseDir . '/../lib/BackgroundJob/PruneOutdatedSyncTokensJob.php', |
|
| 25 | - 'OCA\\DAV\\BackgroundJob\\RefreshWebcalJob' => $baseDir . '/../lib/BackgroundJob/RefreshWebcalJob.php', |
|
| 26 | - 'OCA\\DAV\\BackgroundJob\\RegisterRegenerateBirthdayCalendars' => $baseDir . '/../lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php', |
|
| 27 | - 'OCA\\DAV\\BackgroundJob\\UpdateCalendarResourcesRoomsBackgroundJob' => $baseDir . '/../lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php', |
|
| 28 | - 'OCA\\DAV\\BackgroundJob\\UploadCleanup' => $baseDir . '/../lib/BackgroundJob/UploadCleanup.php', |
|
| 29 | - 'OCA\\DAV\\BackgroundJob\\UserStatusAutomation' => $baseDir . '/../lib/BackgroundJob/UserStatusAutomation.php', |
|
| 30 | - 'OCA\\DAV\\BulkUpload\\BulkUploadPlugin' => $baseDir . '/../lib/BulkUpload/BulkUploadPlugin.php', |
|
| 31 | - 'OCA\\DAV\\BulkUpload\\MultipartRequestParser' => $baseDir . '/../lib/BulkUpload/MultipartRequestParser.php', |
|
| 32 | - 'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir . '/../lib/CalDAV/Activity/Backend.php', |
|
| 33 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 34 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 35 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir . '/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 36 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 37 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir . '/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 38 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 39 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\CalDAVSetting' => $baseDir . '/../lib/CalDAV/Activity/Setting/CalDAVSetting.php', |
|
| 40 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 41 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir . '/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 42 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 43 | - 'OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendar' => $baseDir . '/../lib/CalDAV/AppCalendar/AppCalendar.php', |
|
| 44 | - 'OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendarPlugin' => $baseDir . '/../lib/CalDAV/AppCalendar/AppCalendarPlugin.php', |
|
| 45 | - 'OCA\\DAV\\CalDAV\\AppCalendar\\CalendarObject' => $baseDir . '/../lib/CalDAV/AppCalendar/CalendarObject.php', |
|
| 46 | - 'OCA\\DAV\\CalDAV\\Auth\\CustomPrincipalPlugin' => $baseDir . '/../lib/CalDAV/Auth/CustomPrincipalPlugin.php', |
|
| 47 | - 'OCA\\DAV\\CalDAV\\Auth\\PublicPrincipalPlugin' => $baseDir . '/../lib/CalDAV/Auth/PublicPrincipalPlugin.php', |
|
| 48 | - 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir . '/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 49 | - 'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir . '/../lib/CalDAV/BirthdayService.php', |
|
| 50 | - 'OCA\\DAV\\CalDAV\\CachedSubscription' => $baseDir . '/../lib/CalDAV/CachedSubscription.php', |
|
| 51 | - 'OCA\\DAV\\CalDAV\\CachedSubscriptionImpl' => $baseDir . '/../lib/CalDAV/CachedSubscriptionImpl.php', |
|
| 52 | - 'OCA\\DAV\\CalDAV\\CachedSubscriptionObject' => $baseDir . '/../lib/CalDAV/CachedSubscriptionObject.php', |
|
| 53 | - 'OCA\\DAV\\CalDAV\\CachedSubscriptionProvider' => $baseDir . '/../lib/CalDAV/CachedSubscriptionProvider.php', |
|
| 54 | - 'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir . '/../lib/CalDAV/CalDavBackend.php', |
|
| 55 | - 'OCA\\DAV\\CalDAV\\Calendar' => $baseDir . '/../lib/CalDAV/Calendar.php', |
|
| 56 | - 'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir . '/../lib/CalDAV/CalendarHome.php', |
|
| 57 | - 'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir . '/../lib/CalDAV/CalendarImpl.php', |
|
| 58 | - 'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir . '/../lib/CalDAV/CalendarManager.php', |
|
| 59 | - 'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir . '/../lib/CalDAV/CalendarObject.php', |
|
| 60 | - 'OCA\\DAV\\CalDAV\\CalendarProvider' => $baseDir . '/../lib/CalDAV/CalendarProvider.php', |
|
| 61 | - 'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir . '/../lib/CalDAV/CalendarRoot.php', |
|
| 62 | - 'OCA\\DAV\\CalDAV\\DefaultCalendarValidator' => $baseDir . '/../lib/CalDAV/DefaultCalendarValidator.php', |
|
| 63 | - 'OCA\\DAV\\CalDAV\\EventComparisonService' => $baseDir . '/../lib/CalDAV/EventComparisonService.php', |
|
| 64 | - 'OCA\\DAV\\CalDAV\\EventReader' => $baseDir . '/../lib/CalDAV/EventReader.php', |
|
| 65 | - 'OCA\\DAV\\CalDAV\\EventReaderRDate' => $baseDir . '/../lib/CalDAV/EventReaderRDate.php', |
|
| 66 | - 'OCA\\DAV\\CalDAV\\EventReaderRRule' => $baseDir . '/../lib/CalDAV/EventReaderRRule.php', |
|
| 67 | - 'OCA\\DAV\\CalDAV\\Export\\ExportService' => $baseDir . '/../lib/CalDAV/Export/ExportService.php', |
|
| 68 | - 'OCA\\DAV\\CalDAV\\FreeBusy\\FreeBusyGenerator' => $baseDir . '/../lib/CalDAV/FreeBusy/FreeBusyGenerator.php', |
|
| 69 | - 'OCA\\DAV\\CalDAV\\ICSExportPlugin\\ICSExportPlugin' => $baseDir . '/../lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php', |
|
| 70 | - 'OCA\\DAV\\CalDAV\\IRestorable' => $baseDir . '/../lib/CalDAV/IRestorable.php', |
|
| 71 | - 'OCA\\DAV\\CalDAV\\Integration\\ExternalCalendar' => $baseDir . '/../lib/CalDAV/Integration/ExternalCalendar.php', |
|
| 72 | - 'OCA\\DAV\\CalDAV\\Integration\\ICalendarProvider' => $baseDir . '/../lib/CalDAV/Integration/ICalendarProvider.php', |
|
| 73 | - 'OCA\\DAV\\CalDAV\\InvitationResponse\\InvitationResponseServer' => $baseDir . '/../lib/CalDAV/InvitationResponse/InvitationResponseServer.php', |
|
| 74 | - 'OCA\\DAV\\CalDAV\\Outbox' => $baseDir . '/../lib/CalDAV/Outbox.php', |
|
| 75 | - 'OCA\\DAV\\CalDAV\\Plugin' => $baseDir . '/../lib/CalDAV/Plugin.php', |
|
| 76 | - 'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir . '/../lib/CalDAV/Principal/Collection.php', |
|
| 77 | - 'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir . '/../lib/CalDAV/Principal/User.php', |
|
| 78 | - 'OCA\\DAV\\CalDAV\\Proxy\\Proxy' => $baseDir . '/../lib/CalDAV/Proxy/Proxy.php', |
|
| 79 | - 'OCA\\DAV\\CalDAV\\Proxy\\ProxyMapper' => $baseDir . '/../lib/CalDAV/Proxy/ProxyMapper.php', |
|
| 80 | - 'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir . '/../lib/CalDAV/PublicCalendar.php', |
|
| 81 | - 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir . '/../lib/CalDAV/PublicCalendarObject.php', |
|
| 82 | - 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir . '/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 83 | - 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir . '/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 84 | - 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir . '/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 85 | - 'OCA\\DAV\\CalDAV\\Reminder\\Backend' => $baseDir . '/../lib/CalDAV/Reminder/Backend.php', |
|
| 86 | - 'OCA\\DAV\\CalDAV\\Reminder\\INotificationProvider' => $baseDir . '/../lib/CalDAV/Reminder/INotificationProvider.php', |
|
| 87 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProviderManager' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProviderManager.php', |
|
| 88 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\AbstractProvider' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php', |
|
| 89 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\AudioProvider' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php', |
|
| 90 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\EmailProvider' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php', |
|
| 91 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\ProviderNotAvailableException' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php', |
|
| 92 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\PushProvider' => $baseDir . '/../lib/CalDAV/Reminder/NotificationProvider/PushProvider.php', |
|
| 93 | - 'OCA\\DAV\\CalDAV\\Reminder\\NotificationTypeDoesNotExistException' => $baseDir . '/../lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php', |
|
| 94 | - 'OCA\\DAV\\CalDAV\\Reminder\\Notifier' => $baseDir . '/../lib/CalDAV/Reminder/Notifier.php', |
|
| 95 | - 'OCA\\DAV\\CalDAV\\Reminder\\ReminderService' => $baseDir . '/../lib/CalDAV/Reminder/ReminderService.php', |
|
| 96 | - 'OCA\\DAV\\CalDAV\\ResourceBooking\\AbstractPrincipalBackend' => $baseDir . '/../lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php', |
|
| 97 | - 'OCA\\DAV\\CalDAV\\ResourceBooking\\ResourcePrincipalBackend' => $baseDir . '/../lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php', |
|
| 98 | - 'OCA\\DAV\\CalDAV\\ResourceBooking\\RoomPrincipalBackend' => $baseDir . '/../lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php', |
|
| 99 | - 'OCA\\DAV\\CalDAV\\RetentionService' => $baseDir . '/../lib/CalDAV/RetentionService.php', |
|
| 100 | - 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir . '/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 101 | - 'OCA\\DAV\\CalDAV\\Schedule\\IMipService' => $baseDir . '/../lib/CalDAV/Schedule/IMipService.php', |
|
| 102 | - 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir . '/../lib/CalDAV/Schedule/Plugin.php', |
|
| 103 | - 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir . '/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 104 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 105 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 106 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 107 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 108 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 109 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 110 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir . '/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 111 | - 'OCA\\DAV\\CalDAV\\Security\\RateLimitingPlugin' => $baseDir . '/../lib/CalDAV/Security/RateLimitingPlugin.php', |
|
| 112 | - 'OCA\\DAV\\CalDAV\\Sharing\\Backend' => $baseDir . '/../lib/CalDAV/Sharing/Backend.php', |
|
| 113 | - 'OCA\\DAV\\CalDAV\\Sharing\\Service' => $baseDir . '/../lib/CalDAV/Sharing/Service.php', |
|
| 114 | - 'OCA\\DAV\\CalDAV\\Status\\StatusService' => $baseDir . '/../lib/CalDAV/Status/StatusService.php', |
|
| 115 | - 'OCA\\DAV\\CalDAV\\TimeZoneFactory' => $baseDir . '/../lib/CalDAV/TimeZoneFactory.php', |
|
| 116 | - 'OCA\\DAV\\CalDAV\\TimezoneService' => $baseDir . '/../lib/CalDAV/TimezoneService.php', |
|
| 117 | - 'OCA\\DAV\\CalDAV\\TipBroker' => $baseDir . '/../lib/CalDAV/TipBroker.php', |
|
| 118 | - 'OCA\\DAV\\CalDAV\\Trashbin\\DeletedCalendarObject' => $baseDir . '/../lib/CalDAV/Trashbin/DeletedCalendarObject.php', |
|
| 119 | - 'OCA\\DAV\\CalDAV\\Trashbin\\DeletedCalendarObjectsCollection' => $baseDir . '/../lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php', |
|
| 120 | - 'OCA\\DAV\\CalDAV\\Trashbin\\Plugin' => $baseDir . '/../lib/CalDAV/Trashbin/Plugin.php', |
|
| 121 | - 'OCA\\DAV\\CalDAV\\Trashbin\\RestoreTarget' => $baseDir . '/../lib/CalDAV/Trashbin/RestoreTarget.php', |
|
| 122 | - 'OCA\\DAV\\CalDAV\\Trashbin\\TrashbinHome' => $baseDir . '/../lib/CalDAV/Trashbin/TrashbinHome.php', |
|
| 123 | - 'OCA\\DAV\\CalDAV\\UpcomingEvent' => $baseDir . '/../lib/CalDAV/UpcomingEvent.php', |
|
| 124 | - 'OCA\\DAV\\CalDAV\\UpcomingEventsService' => $baseDir . '/../lib/CalDAV/UpcomingEventsService.php', |
|
| 125 | - 'OCA\\DAV\\CalDAV\\Validation\\CalDavValidatePlugin' => $baseDir . '/../lib/CalDAV/Validation/CalDavValidatePlugin.php', |
|
| 126 | - 'OCA\\DAV\\CalDAV\\WebcalCaching\\Connection' => $baseDir . '/../lib/CalDAV/WebcalCaching/Connection.php', |
|
| 127 | - 'OCA\\DAV\\CalDAV\\WebcalCaching\\Plugin' => $baseDir . '/../lib/CalDAV/WebcalCaching/Plugin.php', |
|
| 128 | - 'OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService' => $baseDir . '/../lib/CalDAV/WebcalCaching/RefreshWebcalService.php', |
|
| 129 | - 'OCA\\DAV\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
| 130 | - 'OCA\\DAV\\CardDAV\\Activity\\Backend' => $baseDir . '/../lib/CardDAV/Activity/Backend.php', |
|
| 131 | - 'OCA\\DAV\\CardDAV\\Activity\\Filter' => $baseDir . '/../lib/CardDAV/Activity/Filter.php', |
|
| 132 | - 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Addressbook' => $baseDir . '/../lib/CardDAV/Activity/Provider/Addressbook.php', |
|
| 133 | - 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Base' => $baseDir . '/../lib/CardDAV/Activity/Provider/Base.php', |
|
| 134 | - 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Card' => $baseDir . '/../lib/CardDAV/Activity/Provider/Card.php', |
|
| 135 | - 'OCA\\DAV\\CardDAV\\Activity\\Setting' => $baseDir . '/../lib/CardDAV/Activity/Setting.php', |
|
| 136 | - 'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir . '/../lib/CardDAV/AddressBook.php', |
|
| 137 | - 'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir . '/../lib/CardDAV/AddressBookImpl.php', |
|
| 138 | - 'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir . '/../lib/CardDAV/AddressBookRoot.php', |
|
| 139 | - 'OCA\\DAV\\CardDAV\\Card' => $baseDir . '/../lib/CardDAV/Card.php', |
|
| 140 | - 'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir . '/../lib/CardDAV/CardDavBackend.php', |
|
| 141 | - 'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir . '/../lib/CardDAV/ContactsManager.php', |
|
| 142 | - 'OCA\\DAV\\CardDAV\\Converter' => $baseDir . '/../lib/CardDAV/Converter.php', |
|
| 143 | - 'OCA\\DAV\\CardDAV\\HasPhotoPlugin' => $baseDir . '/../lib/CardDAV/HasPhotoPlugin.php', |
|
| 144 | - 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir . '/../lib/CardDAV/ImageExportPlugin.php', |
|
| 145 | - 'OCA\\DAV\\CardDAV\\Integration\\ExternalAddressBook' => $baseDir . '/../lib/CardDAV/Integration/ExternalAddressBook.php', |
|
| 146 | - 'OCA\\DAV\\CardDAV\\Integration\\IAddressBookProvider' => $baseDir . '/../lib/CardDAV/Integration/IAddressBookProvider.php', |
|
| 147 | - 'OCA\\DAV\\CardDAV\\MultiGetExportPlugin' => $baseDir . '/../lib/CardDAV/MultiGetExportPlugin.php', |
|
| 148 | - 'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir . '/../lib/CardDAV/PhotoCache.php', |
|
| 149 | - 'OCA\\DAV\\CardDAV\\Plugin' => $baseDir . '/../lib/CardDAV/Plugin.php', |
|
| 150 | - 'OCA\\DAV\\CardDAV\\Security\\CardDavRateLimitingPlugin' => $baseDir . '/../lib/CardDAV/Security/CardDavRateLimitingPlugin.php', |
|
| 151 | - 'OCA\\DAV\\CardDAV\\Sharing\\Backend' => $baseDir . '/../lib/CardDAV/Sharing/Backend.php', |
|
| 152 | - 'OCA\\DAV\\CardDAV\\Sharing\\Service' => $baseDir . '/../lib/CardDAV/Sharing/Service.php', |
|
| 153 | - 'OCA\\DAV\\CardDAV\\SyncService' => $baseDir . '/../lib/CardDAV/SyncService.php', |
|
| 154 | - 'OCA\\DAV\\CardDAV\\SystemAddressbook' => $baseDir . '/../lib/CardDAV/SystemAddressbook.php', |
|
| 155 | - 'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir . '/../lib/CardDAV/UserAddressBooks.php', |
|
| 156 | - 'OCA\\DAV\\CardDAV\\Validation\\CardDavValidatePlugin' => $baseDir . '/../lib/CardDAV/Validation/CardDavValidatePlugin.php', |
|
| 157 | - 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php', |
|
| 158 | - 'OCA\\DAV\\Command\\ClearCalendarUnshares' => $baseDir . '/../lib/Command/ClearCalendarUnshares.php', |
|
| 159 | - 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php', |
|
| 160 | - 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php', |
|
| 161 | - 'OCA\\DAV\\Command\\CreateSubscription' => $baseDir . '/../lib/Command/CreateSubscription.php', |
|
| 162 | - 'OCA\\DAV\\Command\\DeleteCalendar' => $baseDir . '/../lib/Command/DeleteCalendar.php', |
|
| 163 | - 'OCA\\DAV\\Command\\DeleteSubscription' => $baseDir . '/../lib/Command/DeleteSubscription.php', |
|
| 164 | - 'OCA\\DAV\\Command\\ExportCalendar' => $baseDir . '/../lib/Command/ExportCalendar.php', |
|
| 165 | - 'OCA\\DAV\\Command\\FixCalendarSyncCommand' => $baseDir . '/../lib/Command/FixCalendarSyncCommand.php', |
|
| 166 | - 'OCA\\DAV\\Command\\ListAddressbooks' => $baseDir . '/../lib/Command/ListAddressbooks.php', |
|
| 167 | - 'OCA\\DAV\\Command\\ListCalendarShares' => $baseDir . '/../lib/Command/ListCalendarShares.php', |
|
| 168 | - 'OCA\\DAV\\Command\\ListCalendars' => $baseDir . '/../lib/Command/ListCalendars.php', |
|
| 169 | - 'OCA\\DAV\\Command\\ListSubscriptions' => $baseDir . '/../lib/Command/ListSubscriptions.php', |
|
| 170 | - 'OCA\\DAV\\Command\\MoveCalendar' => $baseDir . '/../lib/Command/MoveCalendar.php', |
|
| 171 | - 'OCA\\DAV\\Command\\RemoveInvalidShares' => $baseDir . '/../lib/Command/RemoveInvalidShares.php', |
|
| 172 | - 'OCA\\DAV\\Command\\RetentionCleanupCommand' => $baseDir . '/../lib/Command/RetentionCleanupCommand.php', |
|
| 173 | - 'OCA\\DAV\\Command\\SendEventReminders' => $baseDir . '/../lib/Command/SendEventReminders.php', |
|
| 174 | - 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir . '/../lib/Command/SyncBirthdayCalendar.php', |
|
| 175 | - 'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir . '/../lib/Command/SyncSystemAddressBook.php', |
|
| 176 | - 'OCA\\DAV\\Comments\\CommentNode' => $baseDir . '/../lib/Comments/CommentNode.php', |
|
| 177 | - 'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir . '/../lib/Comments/CommentsPlugin.php', |
|
| 178 | - 'OCA\\DAV\\Comments\\EntityCollection' => $baseDir . '/../lib/Comments/EntityCollection.php', |
|
| 179 | - 'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir . '/../lib/Comments/EntityTypeCollection.php', |
|
| 180 | - 'OCA\\DAV\\Comments\\RootCollection' => $baseDir . '/../lib/Comments/RootCollection.php', |
|
| 181 | - 'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir . '/../lib/Connector/LegacyDAVACL.php', |
|
| 182 | - 'OCA\\DAV\\Connector\\LegacyPublicAuth' => $baseDir . '/../lib/Connector/LegacyPublicAuth.php', |
|
| 183 | - 'OCA\\DAV\\Connector\\Sabre\\AnonymousOptionsPlugin' => $baseDir . '/../lib/Connector/Sabre/AnonymousOptionsPlugin.php', |
|
| 184 | - 'OCA\\DAV\\Connector\\Sabre\\AppleQuirksPlugin' => $baseDir . '/../lib/Connector/Sabre/AppleQuirksPlugin.php', |
|
| 185 | - 'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir . '/../lib/Connector/Sabre/Auth.php', |
|
| 186 | - 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir . '/../lib/Connector/Sabre/BearerAuth.php', |
|
| 187 | - 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir . '/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 188 | - 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir . '/../lib/Connector/Sabre/CachingTree.php', |
|
| 189 | - 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir . '/../lib/Connector/Sabre/ChecksumList.php', |
|
| 190 | - 'OCA\\DAV\\Connector\\Sabre\\ChecksumUpdatePlugin' => $baseDir . '/../lib/Connector/Sabre/ChecksumUpdatePlugin.php', |
|
| 191 | - 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir . '/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 192 | - 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir . '/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 193 | - 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir . '/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 194 | - 'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir . '/../lib/Connector/Sabre/Directory.php', |
|
| 195 | - 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir . '/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 196 | - 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir . '/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 197 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\BadGateway' => $baseDir . '/../lib/Connector/Sabre/Exception/BadGateway.php', |
|
| 198 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir . '/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 199 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir . '/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 200 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 201 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir . '/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 202 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 203 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\TooManyRequests' => $baseDir . '/../lib/Connector/Sabre/Exception/TooManyRequests.php', |
|
| 204 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir . '/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 205 | - 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir . '/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 206 | - 'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir . '/../lib/Connector/Sabre/File.php', |
|
| 207 | - 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 208 | - 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 209 | - 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir . '/../lib/Connector/Sabre/LockPlugin.php', |
|
| 210 | - 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir . '/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 211 | - 'OCA\\DAV\\Connector\\Sabre\\MtimeSanitizer' => $baseDir . '/../lib/Connector/Sabre/MtimeSanitizer.php', |
|
| 212 | - 'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir . '/../lib/Connector/Sabre/Node.php', |
|
| 213 | - 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir . '/../lib/Connector/Sabre/ObjectTree.php', |
|
| 214 | - 'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir . '/../lib/Connector/Sabre/Principal.php', |
|
| 215 | - 'OCA\\DAV\\Connector\\Sabre\\PropfindCompressionPlugin' => $baseDir . '/../lib/Connector/Sabre/PropfindCompressionPlugin.php', |
|
| 216 | - 'OCA\\DAV\\Connector\\Sabre\\PublicAuth' => $baseDir . '/../lib/Connector/Sabre/PublicAuth.php', |
|
| 217 | - 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir . '/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 218 | - 'OCA\\DAV\\Connector\\Sabre\\RequestIdHeaderPlugin' => $baseDir . '/../lib/Connector/Sabre/RequestIdHeaderPlugin.php', |
|
| 219 | - 'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir . '/../lib/Connector/Sabre/Server.php', |
|
| 220 | - 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir . '/../lib/Connector/Sabre/ServerFactory.php', |
|
| 221 | - 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir . '/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 222 | - 'OCA\\DAV\\Connector\\Sabre\\ShareeList' => $baseDir . '/../lib/Connector/Sabre/ShareeList.php', |
|
| 223 | - 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir . '/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 224 | - 'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir . '/../lib/Connector/Sabre/TagList.php', |
|
| 225 | - 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir . '/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 226 | - 'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => $baseDir . '/../lib/Connector/Sabre/ZipFolderPlugin.php', |
|
| 227 | - 'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir . '/../lib/Controller/BirthdayCalendarController.php', |
|
| 228 | - 'OCA\\DAV\\Controller\\DirectController' => $baseDir . '/../lib/Controller/DirectController.php', |
|
| 229 | - 'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir . '/../lib/Controller/ExampleContentController.php', |
|
| 230 | - 'OCA\\DAV\\Controller\\InvitationResponseController' => $baseDir . '/../lib/Controller/InvitationResponseController.php', |
|
| 231 | - 'OCA\\DAV\\Controller\\OutOfOfficeController' => $baseDir . '/../lib/Controller/OutOfOfficeController.php', |
|
| 232 | - 'OCA\\DAV\\Controller\\UpcomingEventsController' => $baseDir . '/../lib/Controller/UpcomingEventsController.php', |
|
| 233 | - 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir . '/../lib/DAV/CustomPropertiesBackend.php', |
|
| 234 | - 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir . '/../lib/DAV/GroupPrincipalBackend.php', |
|
| 235 | - 'OCA\\DAV\\DAV\\PublicAuth' => $baseDir . '/../lib/DAV/PublicAuth.php', |
|
| 236 | - 'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir . '/../lib/DAV/Sharing/Backend.php', |
|
| 237 | - 'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir . '/../lib/DAV/Sharing/IShareable.php', |
|
| 238 | - 'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir . '/../lib/DAV/Sharing/Plugin.php', |
|
| 239 | - 'OCA\\DAV\\DAV\\Sharing\\SharingMapper' => $baseDir . '/../lib/DAV/Sharing/SharingMapper.php', |
|
| 240 | - 'OCA\\DAV\\DAV\\Sharing\\SharingService' => $baseDir . '/../lib/DAV/Sharing/SharingService.php', |
|
| 241 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir . '/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 242 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir . '/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 243 | - 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir . '/../lib/DAV/SystemPrincipalBackend.php', |
|
| 244 | - 'OCA\\DAV\\DAV\\ViewOnlyPlugin' => $baseDir . '/../lib/DAV/ViewOnlyPlugin.php', |
|
| 245 | - 'OCA\\DAV\\Db\\Absence' => $baseDir . '/../lib/Db/Absence.php', |
|
| 246 | - 'OCA\\DAV\\Db\\AbsenceMapper' => $baseDir . '/../lib/Db/AbsenceMapper.php', |
|
| 247 | - 'OCA\\DAV\\Db\\Direct' => $baseDir . '/../lib/Db/Direct.php', |
|
| 248 | - 'OCA\\DAV\\Db\\DirectMapper' => $baseDir . '/../lib/Db/DirectMapper.php', |
|
| 249 | - 'OCA\\DAV\\Db\\Property' => $baseDir . '/../lib/Db/Property.php', |
|
| 250 | - 'OCA\\DAV\\Db\\PropertyMapper' => $baseDir . '/../lib/Db/PropertyMapper.php', |
|
| 251 | - 'OCA\\DAV\\Direct\\DirectFile' => $baseDir . '/../lib/Direct/DirectFile.php', |
|
| 252 | - 'OCA\\DAV\\Direct\\DirectHome' => $baseDir . '/../lib/Direct/DirectHome.php', |
|
| 253 | - 'OCA\\DAV\\Direct\\Server' => $baseDir . '/../lib/Direct/Server.php', |
|
| 254 | - 'OCA\\DAV\\Direct\\ServerFactory' => $baseDir . '/../lib/Direct/ServerFactory.php', |
|
| 255 | - 'OCA\\DAV\\Events\\AddressBookCreatedEvent' => $baseDir . '/../lib/Events/AddressBookCreatedEvent.php', |
|
| 256 | - 'OCA\\DAV\\Events\\AddressBookDeletedEvent' => $baseDir . '/../lib/Events/AddressBookDeletedEvent.php', |
|
| 257 | - 'OCA\\DAV\\Events\\AddressBookShareUpdatedEvent' => $baseDir . '/../lib/Events/AddressBookShareUpdatedEvent.php', |
|
| 258 | - 'OCA\\DAV\\Events\\AddressBookUpdatedEvent' => $baseDir . '/../lib/Events/AddressBookUpdatedEvent.php', |
|
| 259 | - 'OCA\\DAV\\Events\\BeforeFileDirectDownloadedEvent' => $baseDir . '/../lib/Events/BeforeFileDirectDownloadedEvent.php', |
|
| 260 | - 'OCA\\DAV\\Events\\CachedCalendarObjectCreatedEvent' => $baseDir . '/../lib/Events/CachedCalendarObjectCreatedEvent.php', |
|
| 261 | - 'OCA\\DAV\\Events\\CachedCalendarObjectDeletedEvent' => $baseDir . '/../lib/Events/CachedCalendarObjectDeletedEvent.php', |
|
| 262 | - 'OCA\\DAV\\Events\\CachedCalendarObjectUpdatedEvent' => $baseDir . '/../lib/Events/CachedCalendarObjectUpdatedEvent.php', |
|
| 263 | - 'OCA\\DAV\\Events\\CalendarCreatedEvent' => $baseDir . '/../lib/Events/CalendarCreatedEvent.php', |
|
| 264 | - 'OCA\\DAV\\Events\\CalendarDeletedEvent' => $baseDir . '/../lib/Events/CalendarDeletedEvent.php', |
|
| 265 | - 'OCA\\DAV\\Events\\CalendarMovedToTrashEvent' => $baseDir . '/../lib/Events/CalendarMovedToTrashEvent.php', |
|
| 266 | - 'OCA\\DAV\\Events\\CalendarPublishedEvent' => $baseDir . '/../lib/Events/CalendarPublishedEvent.php', |
|
| 267 | - 'OCA\\DAV\\Events\\CalendarRestoredEvent' => $baseDir . '/../lib/Events/CalendarRestoredEvent.php', |
|
| 268 | - 'OCA\\DAV\\Events\\CalendarShareUpdatedEvent' => $baseDir . '/../lib/Events/CalendarShareUpdatedEvent.php', |
|
| 269 | - 'OCA\\DAV\\Events\\CalendarUnpublishedEvent' => $baseDir . '/../lib/Events/CalendarUnpublishedEvent.php', |
|
| 270 | - 'OCA\\DAV\\Events\\CalendarUpdatedEvent' => $baseDir . '/../lib/Events/CalendarUpdatedEvent.php', |
|
| 271 | - 'OCA\\DAV\\Events\\CardCreatedEvent' => $baseDir . '/../lib/Events/CardCreatedEvent.php', |
|
| 272 | - 'OCA\\DAV\\Events\\CardDeletedEvent' => $baseDir . '/../lib/Events/CardDeletedEvent.php', |
|
| 273 | - 'OCA\\DAV\\Events\\CardMovedEvent' => $baseDir . '/../lib/Events/CardMovedEvent.php', |
|
| 274 | - 'OCA\\DAV\\Events\\CardUpdatedEvent' => $baseDir . '/../lib/Events/CardUpdatedEvent.php', |
|
| 275 | - 'OCA\\DAV\\Events\\SabrePluginAddEvent' => $baseDir . '/../lib/Events/SabrePluginAddEvent.php', |
|
| 276 | - 'OCA\\DAV\\Events\\SabrePluginAuthInitEvent' => $baseDir . '/../lib/Events/SabrePluginAuthInitEvent.php', |
|
| 277 | - 'OCA\\DAV\\Events\\SubscriptionCreatedEvent' => $baseDir . '/../lib/Events/SubscriptionCreatedEvent.php', |
|
| 278 | - 'OCA\\DAV\\Events\\SubscriptionDeletedEvent' => $baseDir . '/../lib/Events/SubscriptionDeletedEvent.php', |
|
| 279 | - 'OCA\\DAV\\Events\\SubscriptionUpdatedEvent' => $baseDir . '/../lib/Events/SubscriptionUpdatedEvent.php', |
|
| 280 | - 'OCA\\DAV\\Exception\\ServerMaintenanceMode' => $baseDir . '/../lib/Exception/ServerMaintenanceMode.php', |
|
| 281 | - 'OCA\\DAV\\Exception\\UnsupportedLimitOnInitialSyncException' => $baseDir . '/../lib/Exception/UnsupportedLimitOnInitialSyncException.php', |
|
| 282 | - 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir . '/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 283 | - 'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir . '/../lib/Files/FileSearchBackend.php', |
|
| 284 | - 'OCA\\DAV\\Files\\FilesHome' => $baseDir . '/../lib/Files/FilesHome.php', |
|
| 285 | - 'OCA\\DAV\\Files\\LazySearchBackend' => $baseDir . '/../lib/Files/LazySearchBackend.php', |
|
| 286 | - 'OCA\\DAV\\Files\\RootCollection' => $baseDir . '/../lib/Files/RootCollection.php', |
|
| 287 | - 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir . '/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 288 | - 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir . '/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 289 | - 'OCA\\DAV\\Files\\Sharing\\RootCollection' => $baseDir . '/../lib/Files/Sharing/RootCollection.php', |
|
| 290 | - 'OCA\\DAV\\Listener\\ActivityUpdaterListener' => $baseDir . '/../lib/Listener/ActivityUpdaterListener.php', |
|
| 291 | - 'OCA\\DAV\\Listener\\AddMissingIndicesListener' => $baseDir . '/../lib/Listener/AddMissingIndicesListener.php', |
|
| 292 | - 'OCA\\DAV\\Listener\\AddressbookListener' => $baseDir . '/../lib/Listener/AddressbookListener.php', |
|
| 293 | - 'OCA\\DAV\\Listener\\BirthdayListener' => $baseDir . '/../lib/Listener/BirthdayListener.php', |
|
| 294 | - 'OCA\\DAV\\Listener\\CalendarContactInteractionListener' => $baseDir . '/../lib/Listener/CalendarContactInteractionListener.php', |
|
| 295 | - 'OCA\\DAV\\Listener\\CalendarDeletionDefaultUpdaterListener' => $baseDir . '/../lib/Listener/CalendarDeletionDefaultUpdaterListener.php', |
|
| 296 | - 'OCA\\DAV\\Listener\\CalendarObjectReminderUpdaterListener' => $baseDir . '/../lib/Listener/CalendarObjectReminderUpdaterListener.php', |
|
| 297 | - 'OCA\\DAV\\Listener\\CalendarPublicationListener' => $baseDir . '/../lib/Listener/CalendarPublicationListener.php', |
|
| 298 | - 'OCA\\DAV\\Listener\\CalendarShareUpdateListener' => $baseDir . '/../lib/Listener/CalendarShareUpdateListener.php', |
|
| 299 | - 'OCA\\DAV\\Listener\\CardListener' => $baseDir . '/../lib/Listener/CardListener.php', |
|
| 300 | - 'OCA\\DAV\\Listener\\ClearPhotoCacheListener' => $baseDir . '/../lib/Listener/ClearPhotoCacheListener.php', |
|
| 301 | - 'OCA\\DAV\\Listener\\DavAdminSettingsListener' => $baseDir . '/../lib/Listener/DavAdminSettingsListener.php', |
|
| 302 | - 'OCA\\DAV\\Listener\\OutOfOfficeListener' => $baseDir . '/../lib/Listener/OutOfOfficeListener.php', |
|
| 303 | - 'OCA\\DAV\\Listener\\SubscriptionListener' => $baseDir . '/../lib/Listener/SubscriptionListener.php', |
|
| 304 | - 'OCA\\DAV\\Listener\\TrustedServerRemovedListener' => $baseDir . '/../lib/Listener/TrustedServerRemovedListener.php', |
|
| 305 | - 'OCA\\DAV\\Listener\\UserEventsListener' => $baseDir . '/../lib/Listener/UserEventsListener.php', |
|
| 306 | - 'OCA\\DAV\\Listener\\UserPreferenceListener' => $baseDir . '/../lib/Listener/UserPreferenceListener.php', |
|
| 307 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 308 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 309 | - 'OCA\\DAV\\Migration\\BuildSocialSearchIndex' => $baseDir . '/../lib/Migration/BuildSocialSearchIndex.php', |
|
| 310 | - 'OCA\\DAV\\Migration\\BuildSocialSearchIndexBackgroundJob' => $baseDir . '/../lib/Migration/BuildSocialSearchIndexBackgroundJob.php', |
|
| 311 | - 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir . '/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 312 | - 'OCA\\DAV\\Migration\\ChunkCleanup' => $baseDir . '/../lib/Migration/ChunkCleanup.php', |
|
| 313 | - 'OCA\\DAV\\Migration\\CreateSystemAddressBookStep' => $baseDir . '/../lib/Migration/CreateSystemAddressBookStep.php', |
|
| 314 | - 'OCA\\DAV\\Migration\\DeleteSchedulingObjects' => $baseDir . '/../lib/Migration/DeleteSchedulingObjects.php', |
|
| 315 | - 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir . '/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 316 | - 'OCA\\DAV\\Migration\\RefreshWebcalJobRegistrar' => $baseDir . '/../lib/Migration/RefreshWebcalJobRegistrar.php', |
|
| 317 | - 'OCA\\DAV\\Migration\\RegenerateBirthdayCalendars' => $baseDir . '/../lib/Migration/RegenerateBirthdayCalendars.php', |
|
| 318 | - 'OCA\\DAV\\Migration\\RegisterBuildReminderIndexBackgroundJob' => $baseDir . '/../lib/Migration/RegisterBuildReminderIndexBackgroundJob.php', |
|
| 319 | - 'OCA\\DAV\\Migration\\RemoveClassifiedEventActivity' => $baseDir . '/../lib/Migration/RemoveClassifiedEventActivity.php', |
|
| 320 | - 'OCA\\DAV\\Migration\\RemoveDeletedUsersCalendarSubscriptions' => $baseDir . '/../lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php', |
|
| 321 | - 'OCA\\DAV\\Migration\\RemoveObjectProperties' => $baseDir . '/../lib/Migration/RemoveObjectProperties.php', |
|
| 322 | - 'OCA\\DAV\\Migration\\RemoveOrphanEventsAndContacts' => $baseDir . '/../lib/Migration/RemoveOrphanEventsAndContacts.php', |
|
| 323 | - 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir . '/../lib/Migration/Version1004Date20170825134824.php', |
|
| 324 | - 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir . '/../lib/Migration/Version1004Date20170919104507.php', |
|
| 325 | - 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir . '/../lib/Migration/Version1004Date20170924124212.php', |
|
| 326 | - 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir . '/../lib/Migration/Version1004Date20170926103422.php', |
|
| 327 | - 'OCA\\DAV\\Migration\\Version1005Date20180413093149' => $baseDir . '/../lib/Migration/Version1005Date20180413093149.php', |
|
| 328 | - 'OCA\\DAV\\Migration\\Version1005Date20180530124431' => $baseDir . '/../lib/Migration/Version1005Date20180530124431.php', |
|
| 329 | - 'OCA\\DAV\\Migration\\Version1006Date20180619154313' => $baseDir . '/../lib/Migration/Version1006Date20180619154313.php', |
|
| 330 | - 'OCA\\DAV\\Migration\\Version1006Date20180628111625' => $baseDir . '/../lib/Migration/Version1006Date20180628111625.php', |
|
| 331 | - 'OCA\\DAV\\Migration\\Version1008Date20181030113700' => $baseDir . '/../lib/Migration/Version1008Date20181030113700.php', |
|
| 332 | - 'OCA\\DAV\\Migration\\Version1008Date20181105104826' => $baseDir . '/../lib/Migration/Version1008Date20181105104826.php', |
|
| 333 | - 'OCA\\DAV\\Migration\\Version1008Date20181105104833' => $baseDir . '/../lib/Migration/Version1008Date20181105104833.php', |
|
| 334 | - 'OCA\\DAV\\Migration\\Version1008Date20181105110300' => $baseDir . '/../lib/Migration/Version1008Date20181105110300.php', |
|
| 335 | - 'OCA\\DAV\\Migration\\Version1008Date20181105112049' => $baseDir . '/../lib/Migration/Version1008Date20181105112049.php', |
|
| 336 | - 'OCA\\DAV\\Migration\\Version1008Date20181114084440' => $baseDir . '/../lib/Migration/Version1008Date20181114084440.php', |
|
| 337 | - 'OCA\\DAV\\Migration\\Version1011Date20190725113607' => $baseDir . '/../lib/Migration/Version1011Date20190725113607.php', |
|
| 338 | - 'OCA\\DAV\\Migration\\Version1011Date20190806104428' => $baseDir . '/../lib/Migration/Version1011Date20190806104428.php', |
|
| 339 | - 'OCA\\DAV\\Migration\\Version1012Date20190808122342' => $baseDir . '/../lib/Migration/Version1012Date20190808122342.php', |
|
| 340 | - 'OCA\\DAV\\Migration\\Version1016Date20201109085907' => $baseDir . '/../lib/Migration/Version1016Date20201109085907.php', |
|
| 341 | - 'OCA\\DAV\\Migration\\Version1017Date20210216083742' => $baseDir . '/../lib/Migration/Version1017Date20210216083742.php', |
|
| 342 | - 'OCA\\DAV\\Migration\\Version1018Date20210312100735' => $baseDir . '/../lib/Migration/Version1018Date20210312100735.php', |
|
| 343 | - 'OCA\\DAV\\Migration\\Version1024Date20211221144219' => $baseDir . '/../lib/Migration/Version1024Date20211221144219.php', |
|
| 344 | - 'OCA\\DAV\\Migration\\Version1025Date20240308063933' => $baseDir . '/../lib/Migration/Version1025Date20240308063933.php', |
|
| 345 | - 'OCA\\DAV\\Migration\\Version1027Date20230504122946' => $baseDir . '/../lib/Migration/Version1027Date20230504122946.php', |
|
| 346 | - 'OCA\\DAV\\Migration\\Version1029Date20221114151721' => $baseDir . '/../lib/Migration/Version1029Date20221114151721.php', |
|
| 347 | - 'OCA\\DAV\\Migration\\Version1029Date20231004091403' => $baseDir . '/../lib/Migration/Version1029Date20231004091403.php', |
|
| 348 | - 'OCA\\DAV\\Migration\\Version1030Date20240205103243' => $baseDir . '/../lib/Migration/Version1030Date20240205103243.php', |
|
| 349 | - 'OCA\\DAV\\Migration\\Version1031Date20240610134258' => $baseDir . '/../lib/Migration/Version1031Date20240610134258.php', |
|
| 350 | - 'OCA\\DAV\\Paginate\\LimitedCopyIterator' => $baseDir . '/../lib/Paginate/LimitedCopyIterator.php', |
|
| 351 | - 'OCA\\DAV\\Paginate\\PaginateCache' => $baseDir . '/../lib/Paginate/PaginateCache.php', |
|
| 352 | - 'OCA\\DAV\\Paginate\\PaginatePlugin' => $baseDir . '/../lib/Paginate/PaginatePlugin.php', |
|
| 353 | - 'OCA\\DAV\\Profiler\\ProfilerPlugin' => $baseDir . '/../lib/Profiler/ProfilerPlugin.php', |
|
| 354 | - 'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningNode' => $baseDir . '/../lib/Provisioning/Apple/AppleProvisioningNode.php', |
|
| 355 | - 'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningPlugin' => $baseDir . '/../lib/Provisioning/Apple/AppleProvisioningPlugin.php', |
|
| 356 | - 'OCA\\DAV\\ResponseDefinitions' => $baseDir . '/../lib/ResponseDefinitions.php', |
|
| 357 | - 'OCA\\DAV\\RootCollection' => $baseDir . '/../lib/RootCollection.php', |
|
| 358 | - 'OCA\\DAV\\Search\\ACalendarSearchProvider' => $baseDir . '/../lib/Search/ACalendarSearchProvider.php', |
|
| 359 | - 'OCA\\DAV\\Search\\ContactsSearchProvider' => $baseDir . '/../lib/Search/ContactsSearchProvider.php', |
|
| 360 | - 'OCA\\DAV\\Search\\EventsSearchProvider' => $baseDir . '/../lib/Search/EventsSearchProvider.php', |
|
| 361 | - 'OCA\\DAV\\Search\\TasksSearchProvider' => $baseDir . '/../lib/Search/TasksSearchProvider.php', |
|
| 362 | - 'OCA\\DAV\\Server' => $baseDir . '/../lib/Server.php', |
|
| 363 | - 'OCA\\DAV\\ServerFactory' => $baseDir . '/../lib/ServerFactory.php', |
|
| 364 | - 'OCA\\DAV\\Service\\AbsenceService' => $baseDir . '/../lib/Service/AbsenceService.php', |
|
| 365 | - 'OCA\\DAV\\Service\\DefaultContactService' => $baseDir . '/../lib/Service/DefaultContactService.php', |
|
| 366 | - 'OCA\\DAV\\Settings\\Admin\\SystemAddressBookSettings' => $baseDir . '/../lib/Settings/Admin/SystemAddressBookSettings.php', |
|
| 367 | - 'OCA\\DAV\\Settings\\AvailabilitySettings' => $baseDir . '/../lib/Settings/AvailabilitySettings.php', |
|
| 368 | - 'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir . '/../lib/Settings/CalDAVSettings.php', |
|
| 369 | - 'OCA\\DAV\\Settings\\ExampleContentSettings' => $baseDir . '/../lib/Settings/ExampleContentSettings.php', |
|
| 370 | - 'OCA\\DAV\\SetupChecks\\NeedsSystemAddressBookSync' => $baseDir . '/../lib/SetupChecks/NeedsSystemAddressBookSync.php', |
|
| 371 | - 'OCA\\DAV\\SetupChecks\\WebdavEndpoint' => $baseDir . '/../lib/SetupChecks/WebdavEndpoint.php', |
|
| 372 | - 'OCA\\DAV\\Storage\\PublicOwnerWrapper' => $baseDir . '/../lib/Storage/PublicOwnerWrapper.php', |
|
| 373 | - 'OCA\\DAV\\Storage\\PublicShareWrapper' => $baseDir . '/../lib/Storage/PublicShareWrapper.php', |
|
| 374 | - 'OCA\\DAV\\SystemTag\\SystemTagList' => $baseDir . '/../lib/SystemTag/SystemTagList.php', |
|
| 375 | - 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir . '/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 376 | - 'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir . '/../lib/SystemTag/SystemTagNode.php', |
|
| 377 | - 'OCA\\DAV\\SystemTag\\SystemTagObjectType' => $baseDir . '/../lib/SystemTag/SystemTagObjectType.php', |
|
| 378 | - 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir . '/../lib/SystemTag/SystemTagPlugin.php', |
|
| 379 | - 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir . '/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 380 | - 'OCA\\DAV\\SystemTag\\SystemTagsInUseCollection' => $baseDir . '/../lib/SystemTag/SystemTagsInUseCollection.php', |
|
| 381 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectList' => $baseDir . '/../lib/SystemTag/SystemTagsObjectList.php', |
|
| 382 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 383 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 384 | - 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir . '/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 385 | - 'OCA\\DAV\\Traits\\PrincipalProxyTrait' => $baseDir . '/../lib/Traits/PrincipalProxyTrait.php', |
|
| 386 | - 'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir . '/../lib/Upload/AssemblyStream.php', |
|
| 387 | - 'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir . '/../lib/Upload/ChunkingPlugin.php', |
|
| 388 | - 'OCA\\DAV\\Upload\\ChunkingV2Plugin' => $baseDir . '/../lib/Upload/ChunkingV2Plugin.php', |
|
| 389 | - 'OCA\\DAV\\Upload\\CleanupService' => $baseDir . '/../lib/Upload/CleanupService.php', |
|
| 390 | - 'OCA\\DAV\\Upload\\FutureFile' => $baseDir . '/../lib/Upload/FutureFile.php', |
|
| 391 | - 'OCA\\DAV\\Upload\\PartFile' => $baseDir . '/../lib/Upload/PartFile.php', |
|
| 392 | - 'OCA\\DAV\\Upload\\RootCollection' => $baseDir . '/../lib/Upload/RootCollection.php', |
|
| 393 | - 'OCA\\DAV\\Upload\\UploadFile' => $baseDir . '/../lib/Upload/UploadFile.php', |
|
| 394 | - 'OCA\\DAV\\Upload\\UploadFolder' => $baseDir . '/../lib/Upload/UploadFolder.php', |
|
| 395 | - 'OCA\\DAV\\Upload\\UploadHome' => $baseDir . '/../lib/Upload/UploadHome.php', |
|
| 396 | - 'OCA\\DAV\\UserMigration\\CalendarMigrator' => $baseDir . '/../lib/UserMigration/CalendarMigrator.php', |
|
| 397 | - 'OCA\\DAV\\UserMigration\\CalendarMigratorException' => $baseDir . '/../lib/UserMigration/CalendarMigratorException.php', |
|
| 398 | - 'OCA\\DAV\\UserMigration\\ContactsMigrator' => $baseDir . '/../lib/UserMigration/ContactsMigrator.php', |
|
| 399 | - 'OCA\\DAV\\UserMigration\\ContactsMigratorException' => $baseDir . '/../lib/UserMigration/ContactsMigratorException.php', |
|
| 400 | - 'OCA\\DAV\\UserMigration\\InvalidAddressBookException' => $baseDir . '/../lib/UserMigration/InvalidAddressBookException.php', |
|
| 401 | - 'OCA\\DAV\\UserMigration\\InvalidCalendarException' => $baseDir . '/../lib/UserMigration/InvalidCalendarException.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\DAV\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 11 | + 'OCA\\DAV\\AppInfo\\PluginManager' => $baseDir.'/../lib/AppInfo/PluginManager.php', |
|
| 12 | + 'OCA\\DAV\\Avatars\\AvatarHome' => $baseDir.'/../lib/Avatars/AvatarHome.php', |
|
| 13 | + 'OCA\\DAV\\Avatars\\AvatarNode' => $baseDir.'/../lib/Avatars/AvatarNode.php', |
|
| 14 | + 'OCA\\DAV\\Avatars\\RootCollection' => $baseDir.'/../lib/Avatars/RootCollection.php', |
|
| 15 | + 'OCA\\DAV\\BackgroundJob\\BuildReminderIndexBackgroundJob' => $baseDir.'/../lib/BackgroundJob/BuildReminderIndexBackgroundJob.php', |
|
| 16 | + 'OCA\\DAV\\BackgroundJob\\CalendarRetentionJob' => $baseDir.'/../lib/BackgroundJob/CalendarRetentionJob.php', |
|
| 17 | + 'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => $baseDir.'/../lib/BackgroundJob/CleanupDirectLinksJob.php', |
|
| 18 | + 'OCA\\DAV\\BackgroundJob\\CleanupInvitationTokenJob' => $baseDir.'/../lib/BackgroundJob/CleanupInvitationTokenJob.php', |
|
| 19 | + 'OCA\\DAV\\BackgroundJob\\CleanupOrphanedChildrenJob' => $baseDir.'/../lib/BackgroundJob/CleanupOrphanedChildrenJob.php', |
|
| 20 | + 'OCA\\DAV\\BackgroundJob\\DeleteOutdatedSchedulingObjects' => $baseDir.'/../lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php', |
|
| 21 | + 'OCA\\DAV\\BackgroundJob\\EventReminderJob' => $baseDir.'/../lib/BackgroundJob/EventReminderJob.php', |
|
| 22 | + 'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => $baseDir.'/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 23 | + 'OCA\\DAV\\BackgroundJob\\OutOfOfficeEventDispatcherJob' => $baseDir.'/../lib/BackgroundJob/OutOfOfficeEventDispatcherJob.php', |
|
| 24 | + 'OCA\\DAV\\BackgroundJob\\PruneOutdatedSyncTokensJob' => $baseDir.'/../lib/BackgroundJob/PruneOutdatedSyncTokensJob.php', |
|
| 25 | + 'OCA\\DAV\\BackgroundJob\\RefreshWebcalJob' => $baseDir.'/../lib/BackgroundJob/RefreshWebcalJob.php', |
|
| 26 | + 'OCA\\DAV\\BackgroundJob\\RegisterRegenerateBirthdayCalendars' => $baseDir.'/../lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php', |
|
| 27 | + 'OCA\\DAV\\BackgroundJob\\UpdateCalendarResourcesRoomsBackgroundJob' => $baseDir.'/../lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php', |
|
| 28 | + 'OCA\\DAV\\BackgroundJob\\UploadCleanup' => $baseDir.'/../lib/BackgroundJob/UploadCleanup.php', |
|
| 29 | + 'OCA\\DAV\\BackgroundJob\\UserStatusAutomation' => $baseDir.'/../lib/BackgroundJob/UserStatusAutomation.php', |
|
| 30 | + 'OCA\\DAV\\BulkUpload\\BulkUploadPlugin' => $baseDir.'/../lib/BulkUpload/BulkUploadPlugin.php', |
|
| 31 | + 'OCA\\DAV\\BulkUpload\\MultipartRequestParser' => $baseDir.'/../lib/BulkUpload/MultipartRequestParser.php', |
|
| 32 | + 'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir.'/../lib/CalDAV/Activity/Backend.php', |
|
| 33 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 34 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 35 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir.'/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 36 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 37 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir.'/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 38 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 39 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\CalDAVSetting' => $baseDir.'/../lib/CalDAV/Activity/Setting/CalDAVSetting.php', |
|
| 40 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 41 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir.'/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 42 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 43 | + 'OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendar' => $baseDir.'/../lib/CalDAV/AppCalendar/AppCalendar.php', |
|
| 44 | + 'OCA\\DAV\\CalDAV\\AppCalendar\\AppCalendarPlugin' => $baseDir.'/../lib/CalDAV/AppCalendar/AppCalendarPlugin.php', |
|
| 45 | + 'OCA\\DAV\\CalDAV\\AppCalendar\\CalendarObject' => $baseDir.'/../lib/CalDAV/AppCalendar/CalendarObject.php', |
|
| 46 | + 'OCA\\DAV\\CalDAV\\Auth\\CustomPrincipalPlugin' => $baseDir.'/../lib/CalDAV/Auth/CustomPrincipalPlugin.php', |
|
| 47 | + 'OCA\\DAV\\CalDAV\\Auth\\PublicPrincipalPlugin' => $baseDir.'/../lib/CalDAV/Auth/PublicPrincipalPlugin.php', |
|
| 48 | + 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir.'/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 49 | + 'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir.'/../lib/CalDAV/BirthdayService.php', |
|
| 50 | + 'OCA\\DAV\\CalDAV\\CachedSubscription' => $baseDir.'/../lib/CalDAV/CachedSubscription.php', |
|
| 51 | + 'OCA\\DAV\\CalDAV\\CachedSubscriptionImpl' => $baseDir.'/../lib/CalDAV/CachedSubscriptionImpl.php', |
|
| 52 | + 'OCA\\DAV\\CalDAV\\CachedSubscriptionObject' => $baseDir.'/../lib/CalDAV/CachedSubscriptionObject.php', |
|
| 53 | + 'OCA\\DAV\\CalDAV\\CachedSubscriptionProvider' => $baseDir.'/../lib/CalDAV/CachedSubscriptionProvider.php', |
|
| 54 | + 'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir.'/../lib/CalDAV/CalDavBackend.php', |
|
| 55 | + 'OCA\\DAV\\CalDAV\\Calendar' => $baseDir.'/../lib/CalDAV/Calendar.php', |
|
| 56 | + 'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir.'/../lib/CalDAV/CalendarHome.php', |
|
| 57 | + 'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir.'/../lib/CalDAV/CalendarImpl.php', |
|
| 58 | + 'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir.'/../lib/CalDAV/CalendarManager.php', |
|
| 59 | + 'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir.'/../lib/CalDAV/CalendarObject.php', |
|
| 60 | + 'OCA\\DAV\\CalDAV\\CalendarProvider' => $baseDir.'/../lib/CalDAV/CalendarProvider.php', |
|
| 61 | + 'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir.'/../lib/CalDAV/CalendarRoot.php', |
|
| 62 | + 'OCA\\DAV\\CalDAV\\DefaultCalendarValidator' => $baseDir.'/../lib/CalDAV/DefaultCalendarValidator.php', |
|
| 63 | + 'OCA\\DAV\\CalDAV\\EventComparisonService' => $baseDir.'/../lib/CalDAV/EventComparisonService.php', |
|
| 64 | + 'OCA\\DAV\\CalDAV\\EventReader' => $baseDir.'/../lib/CalDAV/EventReader.php', |
|
| 65 | + 'OCA\\DAV\\CalDAV\\EventReaderRDate' => $baseDir.'/../lib/CalDAV/EventReaderRDate.php', |
|
| 66 | + 'OCA\\DAV\\CalDAV\\EventReaderRRule' => $baseDir.'/../lib/CalDAV/EventReaderRRule.php', |
|
| 67 | + 'OCA\\DAV\\CalDAV\\Export\\ExportService' => $baseDir.'/../lib/CalDAV/Export/ExportService.php', |
|
| 68 | + 'OCA\\DAV\\CalDAV\\FreeBusy\\FreeBusyGenerator' => $baseDir.'/../lib/CalDAV/FreeBusy/FreeBusyGenerator.php', |
|
| 69 | + 'OCA\\DAV\\CalDAV\\ICSExportPlugin\\ICSExportPlugin' => $baseDir.'/../lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php', |
|
| 70 | + 'OCA\\DAV\\CalDAV\\IRestorable' => $baseDir.'/../lib/CalDAV/IRestorable.php', |
|
| 71 | + 'OCA\\DAV\\CalDAV\\Integration\\ExternalCalendar' => $baseDir.'/../lib/CalDAV/Integration/ExternalCalendar.php', |
|
| 72 | + 'OCA\\DAV\\CalDAV\\Integration\\ICalendarProvider' => $baseDir.'/../lib/CalDAV/Integration/ICalendarProvider.php', |
|
| 73 | + 'OCA\\DAV\\CalDAV\\InvitationResponse\\InvitationResponseServer' => $baseDir.'/../lib/CalDAV/InvitationResponse/InvitationResponseServer.php', |
|
| 74 | + 'OCA\\DAV\\CalDAV\\Outbox' => $baseDir.'/../lib/CalDAV/Outbox.php', |
|
| 75 | + 'OCA\\DAV\\CalDAV\\Plugin' => $baseDir.'/../lib/CalDAV/Plugin.php', |
|
| 76 | + 'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir.'/../lib/CalDAV/Principal/Collection.php', |
|
| 77 | + 'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir.'/../lib/CalDAV/Principal/User.php', |
|
| 78 | + 'OCA\\DAV\\CalDAV\\Proxy\\Proxy' => $baseDir.'/../lib/CalDAV/Proxy/Proxy.php', |
|
| 79 | + 'OCA\\DAV\\CalDAV\\Proxy\\ProxyMapper' => $baseDir.'/../lib/CalDAV/Proxy/ProxyMapper.php', |
|
| 80 | + 'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir.'/../lib/CalDAV/PublicCalendar.php', |
|
| 81 | + 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir.'/../lib/CalDAV/PublicCalendarObject.php', |
|
| 82 | + 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir.'/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 83 | + 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir.'/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 84 | + 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir.'/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 85 | + 'OCA\\DAV\\CalDAV\\Reminder\\Backend' => $baseDir.'/../lib/CalDAV/Reminder/Backend.php', |
|
| 86 | + 'OCA\\DAV\\CalDAV\\Reminder\\INotificationProvider' => $baseDir.'/../lib/CalDAV/Reminder/INotificationProvider.php', |
|
| 87 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProviderManager' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProviderManager.php', |
|
| 88 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\AbstractProvider' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php', |
|
| 89 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\AudioProvider' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php', |
|
| 90 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\EmailProvider' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php', |
|
| 91 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\ProviderNotAvailableException' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php', |
|
| 92 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationProvider\\PushProvider' => $baseDir.'/../lib/CalDAV/Reminder/NotificationProvider/PushProvider.php', |
|
| 93 | + 'OCA\\DAV\\CalDAV\\Reminder\\NotificationTypeDoesNotExistException' => $baseDir.'/../lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php', |
|
| 94 | + 'OCA\\DAV\\CalDAV\\Reminder\\Notifier' => $baseDir.'/../lib/CalDAV/Reminder/Notifier.php', |
|
| 95 | + 'OCA\\DAV\\CalDAV\\Reminder\\ReminderService' => $baseDir.'/../lib/CalDAV/Reminder/ReminderService.php', |
|
| 96 | + 'OCA\\DAV\\CalDAV\\ResourceBooking\\AbstractPrincipalBackend' => $baseDir.'/../lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php', |
|
| 97 | + 'OCA\\DAV\\CalDAV\\ResourceBooking\\ResourcePrincipalBackend' => $baseDir.'/../lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php', |
|
| 98 | + 'OCA\\DAV\\CalDAV\\ResourceBooking\\RoomPrincipalBackend' => $baseDir.'/../lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php', |
|
| 99 | + 'OCA\\DAV\\CalDAV\\RetentionService' => $baseDir.'/../lib/CalDAV/RetentionService.php', |
|
| 100 | + 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir.'/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 101 | + 'OCA\\DAV\\CalDAV\\Schedule\\IMipService' => $baseDir.'/../lib/CalDAV/Schedule/IMipService.php', |
|
| 102 | + 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir.'/../lib/CalDAV/Schedule/Plugin.php', |
|
| 103 | + 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir.'/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 104 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 105 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 106 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 107 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 108 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 109 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 110 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir.'/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 111 | + 'OCA\\DAV\\CalDAV\\Security\\RateLimitingPlugin' => $baseDir.'/../lib/CalDAV/Security/RateLimitingPlugin.php', |
|
| 112 | + 'OCA\\DAV\\CalDAV\\Sharing\\Backend' => $baseDir.'/../lib/CalDAV/Sharing/Backend.php', |
|
| 113 | + 'OCA\\DAV\\CalDAV\\Sharing\\Service' => $baseDir.'/../lib/CalDAV/Sharing/Service.php', |
|
| 114 | + 'OCA\\DAV\\CalDAV\\Status\\StatusService' => $baseDir.'/../lib/CalDAV/Status/StatusService.php', |
|
| 115 | + 'OCA\\DAV\\CalDAV\\TimeZoneFactory' => $baseDir.'/../lib/CalDAV/TimeZoneFactory.php', |
|
| 116 | + 'OCA\\DAV\\CalDAV\\TimezoneService' => $baseDir.'/../lib/CalDAV/TimezoneService.php', |
|
| 117 | + 'OCA\\DAV\\CalDAV\\TipBroker' => $baseDir.'/../lib/CalDAV/TipBroker.php', |
|
| 118 | + 'OCA\\DAV\\CalDAV\\Trashbin\\DeletedCalendarObject' => $baseDir.'/../lib/CalDAV/Trashbin/DeletedCalendarObject.php', |
|
| 119 | + 'OCA\\DAV\\CalDAV\\Trashbin\\DeletedCalendarObjectsCollection' => $baseDir.'/../lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php', |
|
| 120 | + 'OCA\\DAV\\CalDAV\\Trashbin\\Plugin' => $baseDir.'/../lib/CalDAV/Trashbin/Plugin.php', |
|
| 121 | + 'OCA\\DAV\\CalDAV\\Trashbin\\RestoreTarget' => $baseDir.'/../lib/CalDAV/Trashbin/RestoreTarget.php', |
|
| 122 | + 'OCA\\DAV\\CalDAV\\Trashbin\\TrashbinHome' => $baseDir.'/../lib/CalDAV/Trashbin/TrashbinHome.php', |
|
| 123 | + 'OCA\\DAV\\CalDAV\\UpcomingEvent' => $baseDir.'/../lib/CalDAV/UpcomingEvent.php', |
|
| 124 | + 'OCA\\DAV\\CalDAV\\UpcomingEventsService' => $baseDir.'/../lib/CalDAV/UpcomingEventsService.php', |
|
| 125 | + 'OCA\\DAV\\CalDAV\\Validation\\CalDavValidatePlugin' => $baseDir.'/../lib/CalDAV/Validation/CalDavValidatePlugin.php', |
|
| 126 | + 'OCA\\DAV\\CalDAV\\WebcalCaching\\Connection' => $baseDir.'/../lib/CalDAV/WebcalCaching/Connection.php', |
|
| 127 | + 'OCA\\DAV\\CalDAV\\WebcalCaching\\Plugin' => $baseDir.'/../lib/CalDAV/WebcalCaching/Plugin.php', |
|
| 128 | + 'OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService' => $baseDir.'/../lib/CalDAV/WebcalCaching/RefreshWebcalService.php', |
|
| 129 | + 'OCA\\DAV\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
| 130 | + 'OCA\\DAV\\CardDAV\\Activity\\Backend' => $baseDir.'/../lib/CardDAV/Activity/Backend.php', |
|
| 131 | + 'OCA\\DAV\\CardDAV\\Activity\\Filter' => $baseDir.'/../lib/CardDAV/Activity/Filter.php', |
|
| 132 | + 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Addressbook' => $baseDir.'/../lib/CardDAV/Activity/Provider/Addressbook.php', |
|
| 133 | + 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Base' => $baseDir.'/../lib/CardDAV/Activity/Provider/Base.php', |
|
| 134 | + 'OCA\\DAV\\CardDAV\\Activity\\Provider\\Card' => $baseDir.'/../lib/CardDAV/Activity/Provider/Card.php', |
|
| 135 | + 'OCA\\DAV\\CardDAV\\Activity\\Setting' => $baseDir.'/../lib/CardDAV/Activity/Setting.php', |
|
| 136 | + 'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir.'/../lib/CardDAV/AddressBook.php', |
|
| 137 | + 'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir.'/../lib/CardDAV/AddressBookImpl.php', |
|
| 138 | + 'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir.'/../lib/CardDAV/AddressBookRoot.php', |
|
| 139 | + 'OCA\\DAV\\CardDAV\\Card' => $baseDir.'/../lib/CardDAV/Card.php', |
|
| 140 | + 'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir.'/../lib/CardDAV/CardDavBackend.php', |
|
| 141 | + 'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir.'/../lib/CardDAV/ContactsManager.php', |
|
| 142 | + 'OCA\\DAV\\CardDAV\\Converter' => $baseDir.'/../lib/CardDAV/Converter.php', |
|
| 143 | + 'OCA\\DAV\\CardDAV\\HasPhotoPlugin' => $baseDir.'/../lib/CardDAV/HasPhotoPlugin.php', |
|
| 144 | + 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir.'/../lib/CardDAV/ImageExportPlugin.php', |
|
| 145 | + 'OCA\\DAV\\CardDAV\\Integration\\ExternalAddressBook' => $baseDir.'/../lib/CardDAV/Integration/ExternalAddressBook.php', |
|
| 146 | + 'OCA\\DAV\\CardDAV\\Integration\\IAddressBookProvider' => $baseDir.'/../lib/CardDAV/Integration/IAddressBookProvider.php', |
|
| 147 | + 'OCA\\DAV\\CardDAV\\MultiGetExportPlugin' => $baseDir.'/../lib/CardDAV/MultiGetExportPlugin.php', |
|
| 148 | + 'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir.'/../lib/CardDAV/PhotoCache.php', |
|
| 149 | + 'OCA\\DAV\\CardDAV\\Plugin' => $baseDir.'/../lib/CardDAV/Plugin.php', |
|
| 150 | + 'OCA\\DAV\\CardDAV\\Security\\CardDavRateLimitingPlugin' => $baseDir.'/../lib/CardDAV/Security/CardDavRateLimitingPlugin.php', |
|
| 151 | + 'OCA\\DAV\\CardDAV\\Sharing\\Backend' => $baseDir.'/../lib/CardDAV/Sharing/Backend.php', |
|
| 152 | + 'OCA\\DAV\\CardDAV\\Sharing\\Service' => $baseDir.'/../lib/CardDAV/Sharing/Service.php', |
|
| 153 | + 'OCA\\DAV\\CardDAV\\SyncService' => $baseDir.'/../lib/CardDAV/SyncService.php', |
|
| 154 | + 'OCA\\DAV\\CardDAV\\SystemAddressbook' => $baseDir.'/../lib/CardDAV/SystemAddressbook.php', |
|
| 155 | + 'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir.'/../lib/CardDAV/UserAddressBooks.php', |
|
| 156 | + 'OCA\\DAV\\CardDAV\\Validation\\CardDavValidatePlugin' => $baseDir.'/../lib/CardDAV/Validation/CardDavValidatePlugin.php', |
|
| 157 | + 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir.'/../lib/CardDAV/Xml/Groups.php', |
|
| 158 | + 'OCA\\DAV\\Command\\ClearCalendarUnshares' => $baseDir.'/../lib/Command/ClearCalendarUnshares.php', |
|
| 159 | + 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir.'/../lib/Command/CreateAddressBook.php', |
|
| 160 | + 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir.'/../lib/Command/CreateCalendar.php', |
|
| 161 | + 'OCA\\DAV\\Command\\CreateSubscription' => $baseDir.'/../lib/Command/CreateSubscription.php', |
|
| 162 | + 'OCA\\DAV\\Command\\DeleteCalendar' => $baseDir.'/../lib/Command/DeleteCalendar.php', |
|
| 163 | + 'OCA\\DAV\\Command\\DeleteSubscription' => $baseDir.'/../lib/Command/DeleteSubscription.php', |
|
| 164 | + 'OCA\\DAV\\Command\\ExportCalendar' => $baseDir.'/../lib/Command/ExportCalendar.php', |
|
| 165 | + 'OCA\\DAV\\Command\\FixCalendarSyncCommand' => $baseDir.'/../lib/Command/FixCalendarSyncCommand.php', |
|
| 166 | + 'OCA\\DAV\\Command\\ListAddressbooks' => $baseDir.'/../lib/Command/ListAddressbooks.php', |
|
| 167 | + 'OCA\\DAV\\Command\\ListCalendarShares' => $baseDir.'/../lib/Command/ListCalendarShares.php', |
|
| 168 | + 'OCA\\DAV\\Command\\ListCalendars' => $baseDir.'/../lib/Command/ListCalendars.php', |
|
| 169 | + 'OCA\\DAV\\Command\\ListSubscriptions' => $baseDir.'/../lib/Command/ListSubscriptions.php', |
|
| 170 | + 'OCA\\DAV\\Command\\MoveCalendar' => $baseDir.'/../lib/Command/MoveCalendar.php', |
|
| 171 | + 'OCA\\DAV\\Command\\RemoveInvalidShares' => $baseDir.'/../lib/Command/RemoveInvalidShares.php', |
|
| 172 | + 'OCA\\DAV\\Command\\RetentionCleanupCommand' => $baseDir.'/../lib/Command/RetentionCleanupCommand.php', |
|
| 173 | + 'OCA\\DAV\\Command\\SendEventReminders' => $baseDir.'/../lib/Command/SendEventReminders.php', |
|
| 174 | + 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir.'/../lib/Command/SyncBirthdayCalendar.php', |
|
| 175 | + 'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir.'/../lib/Command/SyncSystemAddressBook.php', |
|
| 176 | + 'OCA\\DAV\\Comments\\CommentNode' => $baseDir.'/../lib/Comments/CommentNode.php', |
|
| 177 | + 'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir.'/../lib/Comments/CommentsPlugin.php', |
|
| 178 | + 'OCA\\DAV\\Comments\\EntityCollection' => $baseDir.'/../lib/Comments/EntityCollection.php', |
|
| 179 | + 'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir.'/../lib/Comments/EntityTypeCollection.php', |
|
| 180 | + 'OCA\\DAV\\Comments\\RootCollection' => $baseDir.'/../lib/Comments/RootCollection.php', |
|
| 181 | + 'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir.'/../lib/Connector/LegacyDAVACL.php', |
|
| 182 | + 'OCA\\DAV\\Connector\\LegacyPublicAuth' => $baseDir.'/../lib/Connector/LegacyPublicAuth.php', |
|
| 183 | + 'OCA\\DAV\\Connector\\Sabre\\AnonymousOptionsPlugin' => $baseDir.'/../lib/Connector/Sabre/AnonymousOptionsPlugin.php', |
|
| 184 | + 'OCA\\DAV\\Connector\\Sabre\\AppleQuirksPlugin' => $baseDir.'/../lib/Connector/Sabre/AppleQuirksPlugin.php', |
|
| 185 | + 'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir.'/../lib/Connector/Sabre/Auth.php', |
|
| 186 | + 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir.'/../lib/Connector/Sabre/BearerAuth.php', |
|
| 187 | + 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir.'/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 188 | + 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir.'/../lib/Connector/Sabre/CachingTree.php', |
|
| 189 | + 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir.'/../lib/Connector/Sabre/ChecksumList.php', |
|
| 190 | + 'OCA\\DAV\\Connector\\Sabre\\ChecksumUpdatePlugin' => $baseDir.'/../lib/Connector/Sabre/ChecksumUpdatePlugin.php', |
|
| 191 | + 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir.'/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 192 | + 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir.'/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 193 | + 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir.'/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 194 | + 'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir.'/../lib/Connector/Sabre/Directory.php', |
|
| 195 | + 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir.'/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 196 | + 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir.'/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 197 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\BadGateway' => $baseDir.'/../lib/Connector/Sabre/Exception/BadGateway.php', |
|
| 198 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir.'/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 199 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir.'/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 200 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 201 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir.'/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 202 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 203 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\TooManyRequests' => $baseDir.'/../lib/Connector/Sabre/Exception/TooManyRequests.php', |
|
| 204 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir.'/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 205 | + 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir.'/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 206 | + 'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir.'/../lib/Connector/Sabre/File.php', |
|
| 207 | + 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 208 | + 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 209 | + 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir.'/../lib/Connector/Sabre/LockPlugin.php', |
|
| 210 | + 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir.'/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 211 | + 'OCA\\DAV\\Connector\\Sabre\\MtimeSanitizer' => $baseDir.'/../lib/Connector/Sabre/MtimeSanitizer.php', |
|
| 212 | + 'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir.'/../lib/Connector/Sabre/Node.php', |
|
| 213 | + 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir.'/../lib/Connector/Sabre/ObjectTree.php', |
|
| 214 | + 'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir.'/../lib/Connector/Sabre/Principal.php', |
|
| 215 | + 'OCA\\DAV\\Connector\\Sabre\\PropfindCompressionPlugin' => $baseDir.'/../lib/Connector/Sabre/PropfindCompressionPlugin.php', |
|
| 216 | + 'OCA\\DAV\\Connector\\Sabre\\PublicAuth' => $baseDir.'/../lib/Connector/Sabre/PublicAuth.php', |
|
| 217 | + 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir.'/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 218 | + 'OCA\\DAV\\Connector\\Sabre\\RequestIdHeaderPlugin' => $baseDir.'/../lib/Connector/Sabre/RequestIdHeaderPlugin.php', |
|
| 219 | + 'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir.'/../lib/Connector/Sabre/Server.php', |
|
| 220 | + 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir.'/../lib/Connector/Sabre/ServerFactory.php', |
|
| 221 | + 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir.'/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 222 | + 'OCA\\DAV\\Connector\\Sabre\\ShareeList' => $baseDir.'/../lib/Connector/Sabre/ShareeList.php', |
|
| 223 | + 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir.'/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 224 | + 'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir.'/../lib/Connector/Sabre/TagList.php', |
|
| 225 | + 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir.'/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 226 | + 'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => $baseDir.'/../lib/Connector/Sabre/ZipFolderPlugin.php', |
|
| 227 | + 'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir.'/../lib/Controller/BirthdayCalendarController.php', |
|
| 228 | + 'OCA\\DAV\\Controller\\DirectController' => $baseDir.'/../lib/Controller/DirectController.php', |
|
| 229 | + 'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir.'/../lib/Controller/ExampleContentController.php', |
|
| 230 | + 'OCA\\DAV\\Controller\\InvitationResponseController' => $baseDir.'/../lib/Controller/InvitationResponseController.php', |
|
| 231 | + 'OCA\\DAV\\Controller\\OutOfOfficeController' => $baseDir.'/../lib/Controller/OutOfOfficeController.php', |
|
| 232 | + 'OCA\\DAV\\Controller\\UpcomingEventsController' => $baseDir.'/../lib/Controller/UpcomingEventsController.php', |
|
| 233 | + 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir.'/../lib/DAV/CustomPropertiesBackend.php', |
|
| 234 | + 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir.'/../lib/DAV/GroupPrincipalBackend.php', |
|
| 235 | + 'OCA\\DAV\\DAV\\PublicAuth' => $baseDir.'/../lib/DAV/PublicAuth.php', |
|
| 236 | + 'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir.'/../lib/DAV/Sharing/Backend.php', |
|
| 237 | + 'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir.'/../lib/DAV/Sharing/IShareable.php', |
|
| 238 | + 'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir.'/../lib/DAV/Sharing/Plugin.php', |
|
| 239 | + 'OCA\\DAV\\DAV\\Sharing\\SharingMapper' => $baseDir.'/../lib/DAV/Sharing/SharingMapper.php', |
|
| 240 | + 'OCA\\DAV\\DAV\\Sharing\\SharingService' => $baseDir.'/../lib/DAV/Sharing/SharingService.php', |
|
| 241 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir.'/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 242 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir.'/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 243 | + 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir.'/../lib/DAV/SystemPrincipalBackend.php', |
|
| 244 | + 'OCA\\DAV\\DAV\\ViewOnlyPlugin' => $baseDir.'/../lib/DAV/ViewOnlyPlugin.php', |
|
| 245 | + 'OCA\\DAV\\Db\\Absence' => $baseDir.'/../lib/Db/Absence.php', |
|
| 246 | + 'OCA\\DAV\\Db\\AbsenceMapper' => $baseDir.'/../lib/Db/AbsenceMapper.php', |
|
| 247 | + 'OCA\\DAV\\Db\\Direct' => $baseDir.'/../lib/Db/Direct.php', |
|
| 248 | + 'OCA\\DAV\\Db\\DirectMapper' => $baseDir.'/../lib/Db/DirectMapper.php', |
|
| 249 | + 'OCA\\DAV\\Db\\Property' => $baseDir.'/../lib/Db/Property.php', |
|
| 250 | + 'OCA\\DAV\\Db\\PropertyMapper' => $baseDir.'/../lib/Db/PropertyMapper.php', |
|
| 251 | + 'OCA\\DAV\\Direct\\DirectFile' => $baseDir.'/../lib/Direct/DirectFile.php', |
|
| 252 | + 'OCA\\DAV\\Direct\\DirectHome' => $baseDir.'/../lib/Direct/DirectHome.php', |
|
| 253 | + 'OCA\\DAV\\Direct\\Server' => $baseDir.'/../lib/Direct/Server.php', |
|
| 254 | + 'OCA\\DAV\\Direct\\ServerFactory' => $baseDir.'/../lib/Direct/ServerFactory.php', |
|
| 255 | + 'OCA\\DAV\\Events\\AddressBookCreatedEvent' => $baseDir.'/../lib/Events/AddressBookCreatedEvent.php', |
|
| 256 | + 'OCA\\DAV\\Events\\AddressBookDeletedEvent' => $baseDir.'/../lib/Events/AddressBookDeletedEvent.php', |
|
| 257 | + 'OCA\\DAV\\Events\\AddressBookShareUpdatedEvent' => $baseDir.'/../lib/Events/AddressBookShareUpdatedEvent.php', |
|
| 258 | + 'OCA\\DAV\\Events\\AddressBookUpdatedEvent' => $baseDir.'/../lib/Events/AddressBookUpdatedEvent.php', |
|
| 259 | + 'OCA\\DAV\\Events\\BeforeFileDirectDownloadedEvent' => $baseDir.'/../lib/Events/BeforeFileDirectDownloadedEvent.php', |
|
| 260 | + 'OCA\\DAV\\Events\\CachedCalendarObjectCreatedEvent' => $baseDir.'/../lib/Events/CachedCalendarObjectCreatedEvent.php', |
|
| 261 | + 'OCA\\DAV\\Events\\CachedCalendarObjectDeletedEvent' => $baseDir.'/../lib/Events/CachedCalendarObjectDeletedEvent.php', |
|
| 262 | + 'OCA\\DAV\\Events\\CachedCalendarObjectUpdatedEvent' => $baseDir.'/../lib/Events/CachedCalendarObjectUpdatedEvent.php', |
|
| 263 | + 'OCA\\DAV\\Events\\CalendarCreatedEvent' => $baseDir.'/../lib/Events/CalendarCreatedEvent.php', |
|
| 264 | + 'OCA\\DAV\\Events\\CalendarDeletedEvent' => $baseDir.'/../lib/Events/CalendarDeletedEvent.php', |
|
| 265 | + 'OCA\\DAV\\Events\\CalendarMovedToTrashEvent' => $baseDir.'/../lib/Events/CalendarMovedToTrashEvent.php', |
|
| 266 | + 'OCA\\DAV\\Events\\CalendarPublishedEvent' => $baseDir.'/../lib/Events/CalendarPublishedEvent.php', |
|
| 267 | + 'OCA\\DAV\\Events\\CalendarRestoredEvent' => $baseDir.'/../lib/Events/CalendarRestoredEvent.php', |
|
| 268 | + 'OCA\\DAV\\Events\\CalendarShareUpdatedEvent' => $baseDir.'/../lib/Events/CalendarShareUpdatedEvent.php', |
|
| 269 | + 'OCA\\DAV\\Events\\CalendarUnpublishedEvent' => $baseDir.'/../lib/Events/CalendarUnpublishedEvent.php', |
|
| 270 | + 'OCA\\DAV\\Events\\CalendarUpdatedEvent' => $baseDir.'/../lib/Events/CalendarUpdatedEvent.php', |
|
| 271 | + 'OCA\\DAV\\Events\\CardCreatedEvent' => $baseDir.'/../lib/Events/CardCreatedEvent.php', |
|
| 272 | + 'OCA\\DAV\\Events\\CardDeletedEvent' => $baseDir.'/../lib/Events/CardDeletedEvent.php', |
|
| 273 | + 'OCA\\DAV\\Events\\CardMovedEvent' => $baseDir.'/../lib/Events/CardMovedEvent.php', |
|
| 274 | + 'OCA\\DAV\\Events\\CardUpdatedEvent' => $baseDir.'/../lib/Events/CardUpdatedEvent.php', |
|
| 275 | + 'OCA\\DAV\\Events\\SabrePluginAddEvent' => $baseDir.'/../lib/Events/SabrePluginAddEvent.php', |
|
| 276 | + 'OCA\\DAV\\Events\\SabrePluginAuthInitEvent' => $baseDir.'/../lib/Events/SabrePluginAuthInitEvent.php', |
|
| 277 | + 'OCA\\DAV\\Events\\SubscriptionCreatedEvent' => $baseDir.'/../lib/Events/SubscriptionCreatedEvent.php', |
|
| 278 | + 'OCA\\DAV\\Events\\SubscriptionDeletedEvent' => $baseDir.'/../lib/Events/SubscriptionDeletedEvent.php', |
|
| 279 | + 'OCA\\DAV\\Events\\SubscriptionUpdatedEvent' => $baseDir.'/../lib/Events/SubscriptionUpdatedEvent.php', |
|
| 280 | + 'OCA\\DAV\\Exception\\ServerMaintenanceMode' => $baseDir.'/../lib/Exception/ServerMaintenanceMode.php', |
|
| 281 | + 'OCA\\DAV\\Exception\\UnsupportedLimitOnInitialSyncException' => $baseDir.'/../lib/Exception/UnsupportedLimitOnInitialSyncException.php', |
|
| 282 | + 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir.'/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 283 | + 'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir.'/../lib/Files/FileSearchBackend.php', |
|
| 284 | + 'OCA\\DAV\\Files\\FilesHome' => $baseDir.'/../lib/Files/FilesHome.php', |
|
| 285 | + 'OCA\\DAV\\Files\\LazySearchBackend' => $baseDir.'/../lib/Files/LazySearchBackend.php', |
|
| 286 | + 'OCA\\DAV\\Files\\RootCollection' => $baseDir.'/../lib/Files/RootCollection.php', |
|
| 287 | + 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir.'/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 288 | + 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir.'/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 289 | + 'OCA\\DAV\\Files\\Sharing\\RootCollection' => $baseDir.'/../lib/Files/Sharing/RootCollection.php', |
|
| 290 | + 'OCA\\DAV\\Listener\\ActivityUpdaterListener' => $baseDir.'/../lib/Listener/ActivityUpdaterListener.php', |
|
| 291 | + 'OCA\\DAV\\Listener\\AddMissingIndicesListener' => $baseDir.'/../lib/Listener/AddMissingIndicesListener.php', |
|
| 292 | + 'OCA\\DAV\\Listener\\AddressbookListener' => $baseDir.'/../lib/Listener/AddressbookListener.php', |
|
| 293 | + 'OCA\\DAV\\Listener\\BirthdayListener' => $baseDir.'/../lib/Listener/BirthdayListener.php', |
|
| 294 | + 'OCA\\DAV\\Listener\\CalendarContactInteractionListener' => $baseDir.'/../lib/Listener/CalendarContactInteractionListener.php', |
|
| 295 | + 'OCA\\DAV\\Listener\\CalendarDeletionDefaultUpdaterListener' => $baseDir.'/../lib/Listener/CalendarDeletionDefaultUpdaterListener.php', |
|
| 296 | + 'OCA\\DAV\\Listener\\CalendarObjectReminderUpdaterListener' => $baseDir.'/../lib/Listener/CalendarObjectReminderUpdaterListener.php', |
|
| 297 | + 'OCA\\DAV\\Listener\\CalendarPublicationListener' => $baseDir.'/../lib/Listener/CalendarPublicationListener.php', |
|
| 298 | + 'OCA\\DAV\\Listener\\CalendarShareUpdateListener' => $baseDir.'/../lib/Listener/CalendarShareUpdateListener.php', |
|
| 299 | + 'OCA\\DAV\\Listener\\CardListener' => $baseDir.'/../lib/Listener/CardListener.php', |
|
| 300 | + 'OCA\\DAV\\Listener\\ClearPhotoCacheListener' => $baseDir.'/../lib/Listener/ClearPhotoCacheListener.php', |
|
| 301 | + 'OCA\\DAV\\Listener\\DavAdminSettingsListener' => $baseDir.'/../lib/Listener/DavAdminSettingsListener.php', |
|
| 302 | + 'OCA\\DAV\\Listener\\OutOfOfficeListener' => $baseDir.'/../lib/Listener/OutOfOfficeListener.php', |
|
| 303 | + 'OCA\\DAV\\Listener\\SubscriptionListener' => $baseDir.'/../lib/Listener/SubscriptionListener.php', |
|
| 304 | + 'OCA\\DAV\\Listener\\TrustedServerRemovedListener' => $baseDir.'/../lib/Listener/TrustedServerRemovedListener.php', |
|
| 305 | + 'OCA\\DAV\\Listener\\UserEventsListener' => $baseDir.'/../lib/Listener/UserEventsListener.php', |
|
| 306 | + 'OCA\\DAV\\Listener\\UserPreferenceListener' => $baseDir.'/../lib/Listener/UserPreferenceListener.php', |
|
| 307 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 308 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 309 | + 'OCA\\DAV\\Migration\\BuildSocialSearchIndex' => $baseDir.'/../lib/Migration/BuildSocialSearchIndex.php', |
|
| 310 | + 'OCA\\DAV\\Migration\\BuildSocialSearchIndexBackgroundJob' => $baseDir.'/../lib/Migration/BuildSocialSearchIndexBackgroundJob.php', |
|
| 311 | + 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir.'/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 312 | + 'OCA\\DAV\\Migration\\ChunkCleanup' => $baseDir.'/../lib/Migration/ChunkCleanup.php', |
|
| 313 | + 'OCA\\DAV\\Migration\\CreateSystemAddressBookStep' => $baseDir.'/../lib/Migration/CreateSystemAddressBookStep.php', |
|
| 314 | + 'OCA\\DAV\\Migration\\DeleteSchedulingObjects' => $baseDir.'/../lib/Migration/DeleteSchedulingObjects.php', |
|
| 315 | + 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir.'/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 316 | + 'OCA\\DAV\\Migration\\RefreshWebcalJobRegistrar' => $baseDir.'/../lib/Migration/RefreshWebcalJobRegistrar.php', |
|
| 317 | + 'OCA\\DAV\\Migration\\RegenerateBirthdayCalendars' => $baseDir.'/../lib/Migration/RegenerateBirthdayCalendars.php', |
|
| 318 | + 'OCA\\DAV\\Migration\\RegisterBuildReminderIndexBackgroundJob' => $baseDir.'/../lib/Migration/RegisterBuildReminderIndexBackgroundJob.php', |
|
| 319 | + 'OCA\\DAV\\Migration\\RemoveClassifiedEventActivity' => $baseDir.'/../lib/Migration/RemoveClassifiedEventActivity.php', |
|
| 320 | + 'OCA\\DAV\\Migration\\RemoveDeletedUsersCalendarSubscriptions' => $baseDir.'/../lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php', |
|
| 321 | + 'OCA\\DAV\\Migration\\RemoveObjectProperties' => $baseDir.'/../lib/Migration/RemoveObjectProperties.php', |
|
| 322 | + 'OCA\\DAV\\Migration\\RemoveOrphanEventsAndContacts' => $baseDir.'/../lib/Migration/RemoveOrphanEventsAndContacts.php', |
|
| 323 | + 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir.'/../lib/Migration/Version1004Date20170825134824.php', |
|
| 324 | + 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir.'/../lib/Migration/Version1004Date20170919104507.php', |
|
| 325 | + 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir.'/../lib/Migration/Version1004Date20170924124212.php', |
|
| 326 | + 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir.'/../lib/Migration/Version1004Date20170926103422.php', |
|
| 327 | + 'OCA\\DAV\\Migration\\Version1005Date20180413093149' => $baseDir.'/../lib/Migration/Version1005Date20180413093149.php', |
|
| 328 | + 'OCA\\DAV\\Migration\\Version1005Date20180530124431' => $baseDir.'/../lib/Migration/Version1005Date20180530124431.php', |
|
| 329 | + 'OCA\\DAV\\Migration\\Version1006Date20180619154313' => $baseDir.'/../lib/Migration/Version1006Date20180619154313.php', |
|
| 330 | + 'OCA\\DAV\\Migration\\Version1006Date20180628111625' => $baseDir.'/../lib/Migration/Version1006Date20180628111625.php', |
|
| 331 | + 'OCA\\DAV\\Migration\\Version1008Date20181030113700' => $baseDir.'/../lib/Migration/Version1008Date20181030113700.php', |
|
| 332 | + 'OCA\\DAV\\Migration\\Version1008Date20181105104826' => $baseDir.'/../lib/Migration/Version1008Date20181105104826.php', |
|
| 333 | + 'OCA\\DAV\\Migration\\Version1008Date20181105104833' => $baseDir.'/../lib/Migration/Version1008Date20181105104833.php', |
|
| 334 | + 'OCA\\DAV\\Migration\\Version1008Date20181105110300' => $baseDir.'/../lib/Migration/Version1008Date20181105110300.php', |
|
| 335 | + 'OCA\\DAV\\Migration\\Version1008Date20181105112049' => $baseDir.'/../lib/Migration/Version1008Date20181105112049.php', |
|
| 336 | + 'OCA\\DAV\\Migration\\Version1008Date20181114084440' => $baseDir.'/../lib/Migration/Version1008Date20181114084440.php', |
|
| 337 | + 'OCA\\DAV\\Migration\\Version1011Date20190725113607' => $baseDir.'/../lib/Migration/Version1011Date20190725113607.php', |
|
| 338 | + 'OCA\\DAV\\Migration\\Version1011Date20190806104428' => $baseDir.'/../lib/Migration/Version1011Date20190806104428.php', |
|
| 339 | + 'OCA\\DAV\\Migration\\Version1012Date20190808122342' => $baseDir.'/../lib/Migration/Version1012Date20190808122342.php', |
|
| 340 | + 'OCA\\DAV\\Migration\\Version1016Date20201109085907' => $baseDir.'/../lib/Migration/Version1016Date20201109085907.php', |
|
| 341 | + 'OCA\\DAV\\Migration\\Version1017Date20210216083742' => $baseDir.'/../lib/Migration/Version1017Date20210216083742.php', |
|
| 342 | + 'OCA\\DAV\\Migration\\Version1018Date20210312100735' => $baseDir.'/../lib/Migration/Version1018Date20210312100735.php', |
|
| 343 | + 'OCA\\DAV\\Migration\\Version1024Date20211221144219' => $baseDir.'/../lib/Migration/Version1024Date20211221144219.php', |
|
| 344 | + 'OCA\\DAV\\Migration\\Version1025Date20240308063933' => $baseDir.'/../lib/Migration/Version1025Date20240308063933.php', |
|
| 345 | + 'OCA\\DAV\\Migration\\Version1027Date20230504122946' => $baseDir.'/../lib/Migration/Version1027Date20230504122946.php', |
|
| 346 | + 'OCA\\DAV\\Migration\\Version1029Date20221114151721' => $baseDir.'/../lib/Migration/Version1029Date20221114151721.php', |
|
| 347 | + 'OCA\\DAV\\Migration\\Version1029Date20231004091403' => $baseDir.'/../lib/Migration/Version1029Date20231004091403.php', |
|
| 348 | + 'OCA\\DAV\\Migration\\Version1030Date20240205103243' => $baseDir.'/../lib/Migration/Version1030Date20240205103243.php', |
|
| 349 | + 'OCA\\DAV\\Migration\\Version1031Date20240610134258' => $baseDir.'/../lib/Migration/Version1031Date20240610134258.php', |
|
| 350 | + 'OCA\\DAV\\Paginate\\LimitedCopyIterator' => $baseDir.'/../lib/Paginate/LimitedCopyIterator.php', |
|
| 351 | + 'OCA\\DAV\\Paginate\\PaginateCache' => $baseDir.'/../lib/Paginate/PaginateCache.php', |
|
| 352 | + 'OCA\\DAV\\Paginate\\PaginatePlugin' => $baseDir.'/../lib/Paginate/PaginatePlugin.php', |
|
| 353 | + 'OCA\\DAV\\Profiler\\ProfilerPlugin' => $baseDir.'/../lib/Profiler/ProfilerPlugin.php', |
|
| 354 | + 'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningNode' => $baseDir.'/../lib/Provisioning/Apple/AppleProvisioningNode.php', |
|
| 355 | + 'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningPlugin' => $baseDir.'/../lib/Provisioning/Apple/AppleProvisioningPlugin.php', |
|
| 356 | + 'OCA\\DAV\\ResponseDefinitions' => $baseDir.'/../lib/ResponseDefinitions.php', |
|
| 357 | + 'OCA\\DAV\\RootCollection' => $baseDir.'/../lib/RootCollection.php', |
|
| 358 | + 'OCA\\DAV\\Search\\ACalendarSearchProvider' => $baseDir.'/../lib/Search/ACalendarSearchProvider.php', |
|
| 359 | + 'OCA\\DAV\\Search\\ContactsSearchProvider' => $baseDir.'/../lib/Search/ContactsSearchProvider.php', |
|
| 360 | + 'OCA\\DAV\\Search\\EventsSearchProvider' => $baseDir.'/../lib/Search/EventsSearchProvider.php', |
|
| 361 | + 'OCA\\DAV\\Search\\TasksSearchProvider' => $baseDir.'/../lib/Search/TasksSearchProvider.php', |
|
| 362 | + 'OCA\\DAV\\Server' => $baseDir.'/../lib/Server.php', |
|
| 363 | + 'OCA\\DAV\\ServerFactory' => $baseDir.'/../lib/ServerFactory.php', |
|
| 364 | + 'OCA\\DAV\\Service\\AbsenceService' => $baseDir.'/../lib/Service/AbsenceService.php', |
|
| 365 | + 'OCA\\DAV\\Service\\DefaultContactService' => $baseDir.'/../lib/Service/DefaultContactService.php', |
|
| 366 | + 'OCA\\DAV\\Settings\\Admin\\SystemAddressBookSettings' => $baseDir.'/../lib/Settings/Admin/SystemAddressBookSettings.php', |
|
| 367 | + 'OCA\\DAV\\Settings\\AvailabilitySettings' => $baseDir.'/../lib/Settings/AvailabilitySettings.php', |
|
| 368 | + 'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir.'/../lib/Settings/CalDAVSettings.php', |
|
| 369 | + 'OCA\\DAV\\Settings\\ExampleContentSettings' => $baseDir.'/../lib/Settings/ExampleContentSettings.php', |
|
| 370 | + 'OCA\\DAV\\SetupChecks\\NeedsSystemAddressBookSync' => $baseDir.'/../lib/SetupChecks/NeedsSystemAddressBookSync.php', |
|
| 371 | + 'OCA\\DAV\\SetupChecks\\WebdavEndpoint' => $baseDir.'/../lib/SetupChecks/WebdavEndpoint.php', |
|
| 372 | + 'OCA\\DAV\\Storage\\PublicOwnerWrapper' => $baseDir.'/../lib/Storage/PublicOwnerWrapper.php', |
|
| 373 | + 'OCA\\DAV\\Storage\\PublicShareWrapper' => $baseDir.'/../lib/Storage/PublicShareWrapper.php', |
|
| 374 | + 'OCA\\DAV\\SystemTag\\SystemTagList' => $baseDir.'/../lib/SystemTag/SystemTagList.php', |
|
| 375 | + 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir.'/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 376 | + 'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir.'/../lib/SystemTag/SystemTagNode.php', |
|
| 377 | + 'OCA\\DAV\\SystemTag\\SystemTagObjectType' => $baseDir.'/../lib/SystemTag/SystemTagObjectType.php', |
|
| 378 | + 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir.'/../lib/SystemTag/SystemTagPlugin.php', |
|
| 379 | + 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir.'/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 380 | + 'OCA\\DAV\\SystemTag\\SystemTagsInUseCollection' => $baseDir.'/../lib/SystemTag/SystemTagsInUseCollection.php', |
|
| 381 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectList' => $baseDir.'/../lib/SystemTag/SystemTagsObjectList.php', |
|
| 382 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 383 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 384 | + 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir.'/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 385 | + 'OCA\\DAV\\Traits\\PrincipalProxyTrait' => $baseDir.'/../lib/Traits/PrincipalProxyTrait.php', |
|
| 386 | + 'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir.'/../lib/Upload/AssemblyStream.php', |
|
| 387 | + 'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir.'/../lib/Upload/ChunkingPlugin.php', |
|
| 388 | + 'OCA\\DAV\\Upload\\ChunkingV2Plugin' => $baseDir.'/../lib/Upload/ChunkingV2Plugin.php', |
|
| 389 | + 'OCA\\DAV\\Upload\\CleanupService' => $baseDir.'/../lib/Upload/CleanupService.php', |
|
| 390 | + 'OCA\\DAV\\Upload\\FutureFile' => $baseDir.'/../lib/Upload/FutureFile.php', |
|
| 391 | + 'OCA\\DAV\\Upload\\PartFile' => $baseDir.'/../lib/Upload/PartFile.php', |
|
| 392 | + 'OCA\\DAV\\Upload\\RootCollection' => $baseDir.'/../lib/Upload/RootCollection.php', |
|
| 393 | + 'OCA\\DAV\\Upload\\UploadFile' => $baseDir.'/../lib/Upload/UploadFile.php', |
|
| 394 | + 'OCA\\DAV\\Upload\\UploadFolder' => $baseDir.'/../lib/Upload/UploadFolder.php', |
|
| 395 | + 'OCA\\DAV\\Upload\\UploadHome' => $baseDir.'/../lib/Upload/UploadHome.php', |
|
| 396 | + 'OCA\\DAV\\UserMigration\\CalendarMigrator' => $baseDir.'/../lib/UserMigration/CalendarMigrator.php', |
|
| 397 | + 'OCA\\DAV\\UserMigration\\CalendarMigratorException' => $baseDir.'/../lib/UserMigration/CalendarMigratorException.php', |
|
| 398 | + 'OCA\\DAV\\UserMigration\\ContactsMigrator' => $baseDir.'/../lib/UserMigration/ContactsMigrator.php', |
|
| 399 | + 'OCA\\DAV\\UserMigration\\ContactsMigratorException' => $baseDir.'/../lib/UserMigration/ContactsMigratorException.php', |
|
| 400 | + 'OCA\\DAV\\UserMigration\\InvalidAddressBookException' => $baseDir.'/../lib/UserMigration/InvalidAddressBookException.php', |
|
| 401 | + 'OCA\\DAV\\UserMigration\\InvalidCalendarException' => $baseDir.'/../lib/UserMigration/InvalidCalendarException.php', |
|
| 402 | 402 | ); |
@@ -19,154 +19,154 @@ |
||
| 19 | 19 | |
| 20 | 20 | class ListCalendarSharesTest extends TestCase { |
| 21 | 21 | |
| 22 | - private IUserManager&MockObject $userManager; |
|
| 23 | - private Principal&MockObject $principal; |
|
| 24 | - private CalDavBackend&MockObject $caldav; |
|
| 25 | - private SharingMapper $sharingMapper; |
|
| 26 | - private ListCalendarShares $command; |
|
| 27 | - |
|
| 28 | - protected function setUp(): void { |
|
| 29 | - parent::setUp(); |
|
| 30 | - |
|
| 31 | - $this->userManager = $this->createMock(IUserManager::class); |
|
| 32 | - $this->principal = $this->createMock(Principal::class); |
|
| 33 | - $this->caldav = $this->createMock(CalDavBackend::class); |
|
| 34 | - $this->sharingMapper = $this->createMock(SharingMapper::class); |
|
| 35 | - |
|
| 36 | - $this->command = new ListCalendarShares( |
|
| 37 | - $this->userManager, |
|
| 38 | - $this->principal, |
|
| 39 | - $this->caldav, |
|
| 40 | - $this->sharingMapper, |
|
| 41 | - ); |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - public function testUserUnknown(): void { |
|
| 45 | - $user = 'bob'; |
|
| 46 | - |
|
| 47 | - $this->expectException(\InvalidArgumentException::class); |
|
| 48 | - $this->expectExceptionMessage("User $user is unknown"); |
|
| 49 | - |
|
| 50 | - $this->userManager->expects($this->once()) |
|
| 51 | - ->method('userExists') |
|
| 52 | - ->with($user) |
|
| 53 | - ->willReturn(false); |
|
| 54 | - |
|
| 55 | - $commandTester = new CommandTester($this->command); |
|
| 56 | - $commandTester->execute([ |
|
| 57 | - 'uid' => $user, |
|
| 58 | - ]); |
|
| 59 | - } |
|
| 60 | - |
|
| 61 | - public function testPrincipalNotFound(): void { |
|
| 62 | - $user = 'bob'; |
|
| 63 | - |
|
| 64 | - $this->expectException(\InvalidArgumentException::class); |
|
| 65 | - $this->expectExceptionMessage("Unable to fetch principal for user $user"); |
|
| 66 | - |
|
| 67 | - $this->userManager->expects($this->once()) |
|
| 68 | - ->method('userExists') |
|
| 69 | - ->with($user) |
|
| 70 | - ->willReturn(true); |
|
| 71 | - |
|
| 72 | - $this->principal->expects($this->once()) |
|
| 73 | - ->method('getPrincipalByPath') |
|
| 74 | - ->with('principals/users/' . $user) |
|
| 75 | - ->willReturn(null); |
|
| 76 | - |
|
| 77 | - $commandTester = new CommandTester($this->command); |
|
| 78 | - $commandTester->execute([ |
|
| 79 | - 'uid' => $user, |
|
| 80 | - ]); |
|
| 81 | - } |
|
| 82 | - |
|
| 83 | - public function testNoCalendarShares(): void { |
|
| 84 | - $user = 'bob'; |
|
| 85 | - |
|
| 86 | - $this->userManager->expects($this->once()) |
|
| 87 | - ->method('userExists') |
|
| 88 | - ->with($user) |
|
| 89 | - ->willReturn(true); |
|
| 90 | - |
|
| 91 | - $this->principal->expects($this->once()) |
|
| 92 | - ->method('getPrincipalByPath') |
|
| 93 | - ->with('principals/users/' . $user) |
|
| 94 | - ->willReturn([ |
|
| 95 | - 'uri' => 'principals/users/' . $user, |
|
| 96 | - ]); |
|
| 97 | - |
|
| 98 | - $this->principal->expects($this->once()) |
|
| 99 | - ->method('getGroupMembership') |
|
| 100 | - ->willReturn([]); |
|
| 101 | - $this->principal->expects($this->once()) |
|
| 102 | - ->method('getCircleMembership') |
|
| 103 | - ->willReturn([]); |
|
| 104 | - |
|
| 105 | - $this->sharingMapper->expects($this->once()) |
|
| 106 | - ->method('getSharesByPrincipals') |
|
| 107 | - ->willReturn([]); |
|
| 108 | - |
|
| 109 | - $commandTester = new CommandTester($this->command); |
|
| 110 | - $commandTester->execute([ |
|
| 111 | - 'uid' => $user, |
|
| 112 | - ]); |
|
| 113 | - |
|
| 114 | - $this->assertStringContainsString( |
|
| 115 | - "User $user has no calendar shares", |
|
| 116 | - $commandTester->getDisplay() |
|
| 117 | - ); |
|
| 118 | - } |
|
| 119 | - |
|
| 120 | - public function testFilterByCalendarId(): void { |
|
| 121 | - $user = 'bob'; |
|
| 122 | - |
|
| 123 | - $this->userManager->expects($this->once()) |
|
| 124 | - ->method('userExists') |
|
| 125 | - ->with($user) |
|
| 126 | - ->willReturn(true); |
|
| 127 | - |
|
| 128 | - $this->principal->expects($this->once()) |
|
| 129 | - ->method('getPrincipalByPath') |
|
| 130 | - ->with('principals/users/' . $user) |
|
| 131 | - ->willReturn([ |
|
| 132 | - 'uri' => 'principals/users/' . $user, |
|
| 133 | - ]); |
|
| 134 | - |
|
| 135 | - $this->principal->expects($this->once()) |
|
| 136 | - ->method('getGroupMembership') |
|
| 137 | - ->willReturn([]); |
|
| 138 | - $this->principal->expects($this->once()) |
|
| 139 | - ->method('getCircleMembership') |
|
| 140 | - ->willReturn([]); |
|
| 141 | - |
|
| 142 | - $this->sharingMapper->expects($this->once()) |
|
| 143 | - ->method('getSharesByPrincipals') |
|
| 144 | - ->willReturn([ |
|
| 145 | - [ |
|
| 146 | - 'id' => 1000, |
|
| 147 | - 'principaluri' => 'principals/users/bob', |
|
| 148 | - 'type' => 'calendar', |
|
| 149 | - 'access' => 2, |
|
| 150 | - 'resourceid' => 10 |
|
| 151 | - ], |
|
| 152 | - [ |
|
| 153 | - 'id' => 1001, |
|
| 154 | - 'principaluri' => 'principals/users/bob', |
|
| 155 | - 'type' => 'calendar', |
|
| 156 | - 'access' => 3, |
|
| 157 | - 'resourceid' => 11 |
|
| 158 | - ], |
|
| 159 | - ]); |
|
| 160 | - |
|
| 161 | - $commandTester = new CommandTester($this->command); |
|
| 162 | - $commandTester->execute([ |
|
| 163 | - 'uid' => $user, |
|
| 164 | - '--calendar-id' => 10, |
|
| 165 | - ]); |
|
| 166 | - |
|
| 167 | - $this->assertStringNotContainsString( |
|
| 168 | - '1001', |
|
| 169 | - $commandTester->getDisplay() |
|
| 170 | - ); |
|
| 171 | - } |
|
| 22 | + private IUserManager&MockObject $userManager; |
|
| 23 | + private Principal&MockObject $principal; |
|
| 24 | + private CalDavBackend&MockObject $caldav; |
|
| 25 | + private SharingMapper $sharingMapper; |
|
| 26 | + private ListCalendarShares $command; |
|
| 27 | + |
|
| 28 | + protected function setUp(): void { |
|
| 29 | + parent::setUp(); |
|
| 30 | + |
|
| 31 | + $this->userManager = $this->createMock(IUserManager::class); |
|
| 32 | + $this->principal = $this->createMock(Principal::class); |
|
| 33 | + $this->caldav = $this->createMock(CalDavBackend::class); |
|
| 34 | + $this->sharingMapper = $this->createMock(SharingMapper::class); |
|
| 35 | + |
|
| 36 | + $this->command = new ListCalendarShares( |
|
| 37 | + $this->userManager, |
|
| 38 | + $this->principal, |
|
| 39 | + $this->caldav, |
|
| 40 | + $this->sharingMapper, |
|
| 41 | + ); |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + public function testUserUnknown(): void { |
|
| 45 | + $user = 'bob'; |
|
| 46 | + |
|
| 47 | + $this->expectException(\InvalidArgumentException::class); |
|
| 48 | + $this->expectExceptionMessage("User $user is unknown"); |
|
| 49 | + |
|
| 50 | + $this->userManager->expects($this->once()) |
|
| 51 | + ->method('userExists') |
|
| 52 | + ->with($user) |
|
| 53 | + ->willReturn(false); |
|
| 54 | + |
|
| 55 | + $commandTester = new CommandTester($this->command); |
|
| 56 | + $commandTester->execute([ |
|
| 57 | + 'uid' => $user, |
|
| 58 | + ]); |
|
| 59 | + } |
|
| 60 | + |
|
| 61 | + public function testPrincipalNotFound(): void { |
|
| 62 | + $user = 'bob'; |
|
| 63 | + |
|
| 64 | + $this->expectException(\InvalidArgumentException::class); |
|
| 65 | + $this->expectExceptionMessage("Unable to fetch principal for user $user"); |
|
| 66 | + |
|
| 67 | + $this->userManager->expects($this->once()) |
|
| 68 | + ->method('userExists') |
|
| 69 | + ->with($user) |
|
| 70 | + ->willReturn(true); |
|
| 71 | + |
|
| 72 | + $this->principal->expects($this->once()) |
|
| 73 | + ->method('getPrincipalByPath') |
|
| 74 | + ->with('principals/users/' . $user) |
|
| 75 | + ->willReturn(null); |
|
| 76 | + |
|
| 77 | + $commandTester = new CommandTester($this->command); |
|
| 78 | + $commandTester->execute([ |
|
| 79 | + 'uid' => $user, |
|
| 80 | + ]); |
|
| 81 | + } |
|
| 82 | + |
|
| 83 | + public function testNoCalendarShares(): void { |
|
| 84 | + $user = 'bob'; |
|
| 85 | + |
|
| 86 | + $this->userManager->expects($this->once()) |
|
| 87 | + ->method('userExists') |
|
| 88 | + ->with($user) |
|
| 89 | + ->willReturn(true); |
|
| 90 | + |
|
| 91 | + $this->principal->expects($this->once()) |
|
| 92 | + ->method('getPrincipalByPath') |
|
| 93 | + ->with('principals/users/' . $user) |
|
| 94 | + ->willReturn([ |
|
| 95 | + 'uri' => 'principals/users/' . $user, |
|
| 96 | + ]); |
|
| 97 | + |
|
| 98 | + $this->principal->expects($this->once()) |
|
| 99 | + ->method('getGroupMembership') |
|
| 100 | + ->willReturn([]); |
|
| 101 | + $this->principal->expects($this->once()) |
|
| 102 | + ->method('getCircleMembership') |
|
| 103 | + ->willReturn([]); |
|
| 104 | + |
|
| 105 | + $this->sharingMapper->expects($this->once()) |
|
| 106 | + ->method('getSharesByPrincipals') |
|
| 107 | + ->willReturn([]); |
|
| 108 | + |
|
| 109 | + $commandTester = new CommandTester($this->command); |
|
| 110 | + $commandTester->execute([ |
|
| 111 | + 'uid' => $user, |
|
| 112 | + ]); |
|
| 113 | + |
|
| 114 | + $this->assertStringContainsString( |
|
| 115 | + "User $user has no calendar shares", |
|
| 116 | + $commandTester->getDisplay() |
|
| 117 | + ); |
|
| 118 | + } |
|
| 119 | + |
|
| 120 | + public function testFilterByCalendarId(): void { |
|
| 121 | + $user = 'bob'; |
|
| 122 | + |
|
| 123 | + $this->userManager->expects($this->once()) |
|
| 124 | + ->method('userExists') |
|
| 125 | + ->with($user) |
|
| 126 | + ->willReturn(true); |
|
| 127 | + |
|
| 128 | + $this->principal->expects($this->once()) |
|
| 129 | + ->method('getPrincipalByPath') |
|
| 130 | + ->with('principals/users/' . $user) |
|
| 131 | + ->willReturn([ |
|
| 132 | + 'uri' => 'principals/users/' . $user, |
|
| 133 | + ]); |
|
| 134 | + |
|
| 135 | + $this->principal->expects($this->once()) |
|
| 136 | + ->method('getGroupMembership') |
|
| 137 | + ->willReturn([]); |
|
| 138 | + $this->principal->expects($this->once()) |
|
| 139 | + ->method('getCircleMembership') |
|
| 140 | + ->willReturn([]); |
|
| 141 | + |
|
| 142 | + $this->sharingMapper->expects($this->once()) |
|
| 143 | + ->method('getSharesByPrincipals') |
|
| 144 | + ->willReturn([ |
|
| 145 | + [ |
|
| 146 | + 'id' => 1000, |
|
| 147 | + 'principaluri' => 'principals/users/bob', |
|
| 148 | + 'type' => 'calendar', |
|
| 149 | + 'access' => 2, |
|
| 150 | + 'resourceid' => 10 |
|
| 151 | + ], |
|
| 152 | + [ |
|
| 153 | + 'id' => 1001, |
|
| 154 | + 'principaluri' => 'principals/users/bob', |
|
| 155 | + 'type' => 'calendar', |
|
| 156 | + 'access' => 3, |
|
| 157 | + 'resourceid' => 11 |
|
| 158 | + ], |
|
| 159 | + ]); |
|
| 160 | + |
|
| 161 | + $commandTester = new CommandTester($this->command); |
|
| 162 | + $commandTester->execute([ |
|
| 163 | + 'uid' => $user, |
|
| 164 | + '--calendar-id' => 10, |
|
| 165 | + ]); |
|
| 166 | + |
|
| 167 | + $this->assertStringNotContainsString( |
|
| 168 | + '1001', |
|
| 169 | + $commandTester->getDisplay() |
|
| 170 | + ); |
|
| 171 | + } |
|
| 172 | 172 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | $this->principal->expects($this->once()) |
| 73 | 73 | ->method('getPrincipalByPath') |
| 74 | - ->with('principals/users/' . $user) |
|
| 74 | + ->with('principals/users/'.$user) |
|
| 75 | 75 | ->willReturn(null); |
| 76 | 76 | |
| 77 | 77 | $commandTester = new CommandTester($this->command); |
@@ -90,9 +90,9 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $this->principal->expects($this->once()) |
| 92 | 92 | ->method('getPrincipalByPath') |
| 93 | - ->with('principals/users/' . $user) |
|
| 93 | + ->with('principals/users/'.$user) |
|
| 94 | 94 | ->willReturn([ |
| 95 | - 'uri' => 'principals/users/' . $user, |
|
| 95 | + 'uri' => 'principals/users/'.$user, |
|
| 96 | 96 | ]); |
| 97 | 97 | |
| 98 | 98 | $this->principal->expects($this->once()) |
@@ -127,9 +127,9 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $this->principal->expects($this->once()) |
| 129 | 129 | ->method('getPrincipalByPath') |
| 130 | - ->with('principals/users/' . $user) |
|
| 130 | + ->with('principals/users/'.$user) |
|
| 131 | 131 | ->willReturn([ |
| 132 | - 'uri' => 'principals/users/' . $user, |
|
| 132 | + 'uri' => 'principals/users/'.$user, |
|
| 133 | 133 | ]); |
| 134 | 134 | |
| 135 | 135 | $this->principal->expects($this->once()) |
@@ -24,376 +24,376 @@ |
||
| 24 | 24 | |
| 25 | 25 | class BackendTest extends TestCase { |
| 26 | 26 | |
| 27 | - private IDBConnection|MockObject $db; |
|
| 28 | - private IUserManager|MockObject $userManager; |
|
| 29 | - private IGroupManager|MockObject $groupManager; |
|
| 30 | - private MockObject|Principal $principalBackend; |
|
| 31 | - private MockObject|ICache $shareCache; |
|
| 32 | - private LoggerInterface|MockObject $logger; |
|
| 33 | - private MockObject|ICacheFactory $cacheFactory; |
|
| 34 | - private Service|MockObject $calendarService; |
|
| 35 | - private CalendarSharingBackend $backend; |
|
| 36 | - |
|
| 37 | - protected function setUp(): void { |
|
| 38 | - parent::setUp(); |
|
| 39 | - $this->db = $this->createMock(IDBConnection::class); |
|
| 40 | - $this->userManager = $this->createMock(IUserManager::class); |
|
| 41 | - $this->groupManager = $this->createMock(IGroupManager::class); |
|
| 42 | - $this->principalBackend = $this->createMock(Principal::class); |
|
| 43 | - $this->cacheFactory = $this->createMock(ICacheFactory::class); |
|
| 44 | - $this->shareCache = $this->createMock(ICache::class); |
|
| 45 | - $this->logger = $this->createMock(LoggerInterface::class); |
|
| 46 | - $this->calendarService = $this->createMock(Service::class); |
|
| 47 | - $this->cacheFactory->expects(self::any()) |
|
| 48 | - ->method('createInMemory') |
|
| 49 | - ->willReturn($this->shareCache); |
|
| 50 | - |
|
| 51 | - $this->backend = new CalendarSharingBackend( |
|
| 52 | - $this->userManager, |
|
| 53 | - $this->groupManager, |
|
| 54 | - $this->principalBackend, |
|
| 55 | - $this->cacheFactory, |
|
| 56 | - $this->calendarService, |
|
| 57 | - $this->logger, |
|
| 58 | - ); |
|
| 59 | - } |
|
| 60 | - |
|
| 61 | - public function testUpdateShareCalendarBob(): void { |
|
| 62 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 63 | - 'getOwner' => 'principals/users/alice', |
|
| 64 | - 'getResourceId' => 42, |
|
| 65 | - ]); |
|
| 66 | - $add = [ |
|
| 67 | - [ |
|
| 68 | - 'href' => 'principal:principals/users/bob', |
|
| 69 | - 'readOnly' => true, |
|
| 70 | - ] |
|
| 71 | - ]; |
|
| 72 | - $principal = 'principals/users/bob'; |
|
| 73 | - |
|
| 74 | - $this->shareCache->expects(self::once()) |
|
| 75 | - ->method('clear'); |
|
| 76 | - $this->principalBackend->expects(self::once()) |
|
| 77 | - ->method('findByUri') |
|
| 78 | - ->willReturn($principal); |
|
| 79 | - $this->userManager->expects(self::once()) |
|
| 80 | - ->method('userExists') |
|
| 81 | - ->willReturn(true); |
|
| 82 | - $this->groupManager->expects(self::never()) |
|
| 83 | - ->method('groupExists'); |
|
| 84 | - $this->calendarService->expects(self::once()) |
|
| 85 | - ->method('shareWith') |
|
| 86 | - ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 87 | - |
|
| 88 | - $this->backend->updateShares($shareable, $add, []); |
|
| 89 | - } |
|
| 90 | - |
|
| 91 | - public function testUpdateShareCalendarGroup(): void { |
|
| 92 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 93 | - 'getOwner' => 'principals/users/alice', |
|
| 94 | - 'getResourceId' => 42, |
|
| 95 | - ]); |
|
| 96 | - $add = [ |
|
| 97 | - [ |
|
| 98 | - 'href' => 'principal:principals/groups/bob', |
|
| 99 | - 'readOnly' => true, |
|
| 100 | - ] |
|
| 101 | - ]; |
|
| 102 | - $principal = 'principals/groups/bob'; |
|
| 103 | - |
|
| 104 | - $this->shareCache->expects(self::once()) |
|
| 105 | - ->method('clear'); |
|
| 106 | - $this->principalBackend->expects(self::once()) |
|
| 107 | - ->method('findByUri') |
|
| 108 | - ->willReturn($principal); |
|
| 109 | - $this->userManager->expects(self::never()) |
|
| 110 | - ->method('userExists'); |
|
| 111 | - $this->groupManager->expects(self::once()) |
|
| 112 | - ->method('groupExists') |
|
| 113 | - ->willReturn(true); |
|
| 114 | - $this->calendarService->expects(self::once()) |
|
| 115 | - ->method('shareWith') |
|
| 116 | - ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 117 | - |
|
| 118 | - $this->backend->updateShares($shareable, $add, []); |
|
| 119 | - } |
|
| 120 | - |
|
| 121 | - public function testUpdateShareContactsBob(): void { |
|
| 122 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 123 | - 'getOwner' => 'principals/users/alice', |
|
| 124 | - 'getResourceId' => 42, |
|
| 125 | - ]); |
|
| 126 | - $add = [ |
|
| 127 | - [ |
|
| 128 | - 'href' => 'principal:principals/users/bob', |
|
| 129 | - 'readOnly' => true, |
|
| 130 | - ] |
|
| 131 | - ]; |
|
| 132 | - $principal = 'principals/users/bob'; |
|
| 133 | - |
|
| 134 | - $this->shareCache->expects(self::once()) |
|
| 135 | - ->method('clear'); |
|
| 136 | - $this->principalBackend->expects(self::once()) |
|
| 137 | - ->method('findByUri') |
|
| 138 | - ->willReturn($principal); |
|
| 139 | - $this->userManager->expects(self::once()) |
|
| 140 | - ->method('userExists') |
|
| 141 | - ->willReturn(true); |
|
| 142 | - $this->groupManager->expects(self::never()) |
|
| 143 | - ->method('groupExists'); |
|
| 144 | - $this->calendarService->expects(self::once()) |
|
| 145 | - ->method('shareWith') |
|
| 146 | - ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 147 | - |
|
| 148 | - $this->backend->updateShares($shareable, $add, []); |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - public function testUpdateShareContactsGroup(): void { |
|
| 152 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 153 | - 'getOwner' => 'principals/users/alice', |
|
| 154 | - 'getResourceId' => 42, |
|
| 155 | - ]); |
|
| 156 | - $add = [ |
|
| 157 | - [ |
|
| 158 | - 'href' => 'principal:principals/groups/bob', |
|
| 159 | - 'readOnly' => true, |
|
| 160 | - ] |
|
| 161 | - ]; |
|
| 162 | - $principal = 'principals/groups/bob'; |
|
| 163 | - |
|
| 164 | - $this->shareCache->expects(self::once()) |
|
| 165 | - ->method('clear'); |
|
| 166 | - $this->principalBackend->expects(self::once()) |
|
| 167 | - ->method('findByUri') |
|
| 168 | - ->willReturn($principal); |
|
| 169 | - $this->userManager->expects(self::never()) |
|
| 170 | - ->method('userExists'); |
|
| 171 | - $this->groupManager->expects(self::once()) |
|
| 172 | - ->method('groupExists') |
|
| 173 | - ->willReturn(true); |
|
| 174 | - $this->calendarService->expects(self::once()) |
|
| 175 | - ->method('shareWith') |
|
| 176 | - ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 177 | - |
|
| 178 | - $this->backend->updateShares($shareable, $add, []); |
|
| 179 | - } |
|
| 180 | - |
|
| 181 | - public function testUpdateShareCircle(): void { |
|
| 182 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 183 | - 'getOwner' => 'principals/users/alice', |
|
| 184 | - 'getResourceId' => 42, |
|
| 185 | - ]); |
|
| 186 | - $add = [ |
|
| 187 | - [ |
|
| 188 | - 'href' => 'principal:principals/circles/bob', |
|
| 189 | - 'readOnly' => true, |
|
| 190 | - ] |
|
| 191 | - ]; |
|
| 192 | - $principal = 'principals/groups/bob'; |
|
| 193 | - |
|
| 194 | - $this->shareCache->expects(self::once()) |
|
| 195 | - ->method('clear'); |
|
| 196 | - $this->principalBackend->expects(self::once()) |
|
| 197 | - ->method('findByUri') |
|
| 198 | - ->willReturn($principal); |
|
| 199 | - $this->userManager->expects(self::never()) |
|
| 200 | - ->method('userExists'); |
|
| 201 | - $this->groupManager->expects(self::once()) |
|
| 202 | - ->method('groupExists') |
|
| 203 | - ->willReturn(true); |
|
| 204 | - $this->calendarService->expects(self::once()) |
|
| 205 | - ->method('shareWith') |
|
| 206 | - ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 207 | - |
|
| 208 | - $this->backend->updateShares($shareable, $add, []); |
|
| 209 | - } |
|
| 210 | - |
|
| 211 | - public function testUnshareBob(): void { |
|
| 212 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 213 | - 'getOwner' => 'principals/users/alice', |
|
| 214 | - 'getResourceId' => 42, |
|
| 215 | - ]); |
|
| 216 | - $remove = [ |
|
| 217 | - 'principal:principals/users/bob', |
|
| 218 | - ]; |
|
| 219 | - $principal = 'principals/users/bob'; |
|
| 220 | - |
|
| 221 | - $this->shareCache->expects(self::once()) |
|
| 222 | - ->method('clear'); |
|
| 223 | - $this->principalBackend->expects(self::once()) |
|
| 224 | - ->method('findByUri') |
|
| 225 | - ->willReturn($principal); |
|
| 226 | - $this->calendarService->expects(self::once()) |
|
| 227 | - ->method('deleteShare') |
|
| 228 | - ->with($shareable->getResourceId(), $principal); |
|
| 229 | - $this->calendarService->expects(self::never()) |
|
| 230 | - ->method('unshare'); |
|
| 231 | - |
|
| 232 | - $this->backend->updateShares($shareable, [], $remove); |
|
| 233 | - } |
|
| 234 | - |
|
| 235 | - public function testUnshareWithBobGroup(): void { |
|
| 236 | - $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 237 | - 'getOwner' => 'principals/users/alice', |
|
| 238 | - 'getResourceId' => 42, |
|
| 239 | - ]); |
|
| 240 | - $remove = [ |
|
| 241 | - 'principal:principals/users/bob', |
|
| 242 | - ]; |
|
| 243 | - $oldShares = [ |
|
| 244 | - [ |
|
| 245 | - 'href' => 'principal:principals/groups/bob', |
|
| 246 | - 'commonName' => 'bob', |
|
| 247 | - 'status' => 1, |
|
| 248 | - 'readOnly' => true, |
|
| 249 | - '{http://owncloud.org/ns}principal' => 'principals/groups/bob', |
|
| 250 | - '{http://owncloud.org/ns}group-share' => true, |
|
| 251 | - ] |
|
| 252 | - ]; |
|
| 253 | - |
|
| 254 | - |
|
| 255 | - $this->shareCache->expects(self::once()) |
|
| 256 | - ->method('clear'); |
|
| 257 | - $this->principalBackend->expects(self::once()) |
|
| 258 | - ->method('findByUri') |
|
| 259 | - ->willReturn('principals/users/bob'); |
|
| 260 | - $this->calendarService->expects(self::once()) |
|
| 261 | - ->method('deleteShare') |
|
| 262 | - ->with($shareable->getResourceId(), 'principals/users/bob'); |
|
| 263 | - $this->calendarService->expects(self::never()) |
|
| 264 | - ->method('unshare'); |
|
| 265 | - |
|
| 266 | - $this->backend->updateShares($shareable, [], $remove, $oldShares); |
|
| 267 | - } |
|
| 268 | - |
|
| 269 | - public function testGetShares(): void { |
|
| 270 | - $resourceId = 42; |
|
| 271 | - $principal = 'principals/groups/bob'; |
|
| 272 | - $rows = [ |
|
| 273 | - [ |
|
| 274 | - 'principaluri' => $principal, |
|
| 275 | - 'access' => Backend::ACCESS_READ, |
|
| 276 | - ] |
|
| 277 | - ]; |
|
| 278 | - $expected = [ |
|
| 279 | - [ |
|
| 280 | - 'href' => 'principal:principals/groups/bob', |
|
| 281 | - 'commonName' => 'bob', |
|
| 282 | - 'status' => 1, |
|
| 283 | - 'readOnly' => true, |
|
| 284 | - '{http://owncloud.org/ns}principal' => $principal, |
|
| 285 | - '{http://owncloud.org/ns}group-share' => true, |
|
| 286 | - ] |
|
| 287 | - ]; |
|
| 288 | - |
|
| 289 | - |
|
| 290 | - $this->shareCache->expects(self::once()) |
|
| 291 | - ->method('get') |
|
| 292 | - ->with((string)$resourceId) |
|
| 293 | - ->willReturn(null); |
|
| 294 | - $this->calendarService->expects(self::once()) |
|
| 295 | - ->method('getShares') |
|
| 296 | - ->with($resourceId) |
|
| 297 | - ->willReturn($rows); |
|
| 298 | - $this->principalBackend->expects(self::once()) |
|
| 299 | - ->method('getPrincipalByPath') |
|
| 300 | - ->with($principal) |
|
| 301 | - ->willReturn(['uri' => $principal, '{DAV:}displayname' => 'bob']); |
|
| 302 | - $this->shareCache->expects(self::once()) |
|
| 303 | - ->method('set') |
|
| 304 | - ->with((string)$resourceId, $expected); |
|
| 305 | - |
|
| 306 | - $result = $this->backend->getShares($resourceId); |
|
| 307 | - $this->assertEquals($expected, $result); |
|
| 308 | - } |
|
| 309 | - |
|
| 310 | - public function testGetSharesAddressbooks(): void { |
|
| 311 | - $service = $this->createMock(\OCA\DAV\CardDAV\Sharing\Service::class); |
|
| 312 | - $backend = new ContactsSharingBackend( |
|
| 313 | - $this->userManager, |
|
| 314 | - $this->groupManager, |
|
| 315 | - $this->principalBackend, |
|
| 316 | - $this->cacheFactory, |
|
| 317 | - $service, |
|
| 318 | - $this->logger); |
|
| 319 | - $resourceId = 42; |
|
| 320 | - $principal = 'principals/groups/bob'; |
|
| 321 | - $rows = [ |
|
| 322 | - [ |
|
| 323 | - 'principaluri' => $principal, |
|
| 324 | - 'access' => Backend::ACCESS_READ, |
|
| 325 | - ] |
|
| 326 | - ]; |
|
| 327 | - $expected = [ |
|
| 328 | - [ |
|
| 329 | - 'href' => 'principal:principals/groups/bob', |
|
| 330 | - 'commonName' => 'bob', |
|
| 331 | - 'status' => 1, |
|
| 332 | - 'readOnly' => true, |
|
| 333 | - '{http://owncloud.org/ns}principal' => $principal, |
|
| 334 | - '{http://owncloud.org/ns}group-share' => true, |
|
| 335 | - ] |
|
| 336 | - ]; |
|
| 337 | - |
|
| 338 | - $this->shareCache->expects(self::once()) |
|
| 339 | - ->method('get') |
|
| 340 | - ->with((string)$resourceId) |
|
| 341 | - ->willReturn(null); |
|
| 342 | - $service->expects(self::once()) |
|
| 343 | - ->method('getShares') |
|
| 344 | - ->with($resourceId) |
|
| 345 | - ->willReturn($rows); |
|
| 346 | - $this->principalBackend->expects(self::once()) |
|
| 347 | - ->method('getPrincipalByPath') |
|
| 348 | - ->with($principal) |
|
| 349 | - ->willReturn(['uri' => $principal, '{DAV:}displayname' => 'bob']); |
|
| 350 | - $this->shareCache->expects(self::once()) |
|
| 351 | - ->method('set') |
|
| 352 | - ->with((string)$resourceId, $expected); |
|
| 353 | - |
|
| 354 | - $result = $backend->getShares($resourceId); |
|
| 355 | - $this->assertEquals($expected, $result); |
|
| 356 | - } |
|
| 357 | - |
|
| 358 | - public function testPreloadShares(): void { |
|
| 359 | - $resourceIds = [42, 99]; |
|
| 360 | - $rows = [ |
|
| 361 | - [ |
|
| 362 | - 'resourceid' => 42, |
|
| 363 | - 'principaluri' => 'principals/groups/bob', |
|
| 364 | - 'access' => Backend::ACCESS_READ, |
|
| 365 | - ], |
|
| 366 | - [ |
|
| 367 | - 'resourceid' => 99, |
|
| 368 | - 'principaluri' => 'principals/users/carlos', |
|
| 369 | - 'access' => Backend::ACCESS_READ_WRITE, |
|
| 370 | - ] |
|
| 371 | - ]; |
|
| 372 | - $principalResults = [ |
|
| 373 | - ['uri' => 'principals/groups/bob', '{DAV:}displayname' => 'bob'], |
|
| 374 | - ['uri' => 'principals/users/carlos', '{DAV:}displayname' => 'carlos'], |
|
| 375 | - ]; |
|
| 376 | - |
|
| 377 | - $this->shareCache->expects(self::exactly(2)) |
|
| 378 | - ->method('get') |
|
| 379 | - ->willReturn(null); |
|
| 380 | - $this->calendarService->expects(self::once()) |
|
| 381 | - ->method('getSharesForIds') |
|
| 382 | - ->with($resourceIds) |
|
| 383 | - ->willReturn($rows); |
|
| 384 | - $this->principalBackend->expects(self::exactly(2)) |
|
| 385 | - ->method('getPrincipalByPath') |
|
| 386 | - ->willReturnCallback(function (string $principal) use ($principalResults) { |
|
| 387 | - switch ($principal) { |
|
| 388 | - case 'principals/groups/bob': |
|
| 389 | - return $principalResults[0]; |
|
| 390 | - default: |
|
| 391 | - return $principalResults[1]; |
|
| 392 | - } |
|
| 393 | - }); |
|
| 394 | - $this->shareCache->expects(self::exactly(2)) |
|
| 395 | - ->method('set'); |
|
| 396 | - |
|
| 397 | - $this->backend->preloadShares($resourceIds); |
|
| 398 | - } |
|
| 27 | + private IDBConnection|MockObject $db; |
|
| 28 | + private IUserManager|MockObject $userManager; |
|
| 29 | + private IGroupManager|MockObject $groupManager; |
|
| 30 | + private MockObject|Principal $principalBackend; |
|
| 31 | + private MockObject|ICache $shareCache; |
|
| 32 | + private LoggerInterface|MockObject $logger; |
|
| 33 | + private MockObject|ICacheFactory $cacheFactory; |
|
| 34 | + private Service|MockObject $calendarService; |
|
| 35 | + private CalendarSharingBackend $backend; |
|
| 36 | + |
|
| 37 | + protected function setUp(): void { |
|
| 38 | + parent::setUp(); |
|
| 39 | + $this->db = $this->createMock(IDBConnection::class); |
|
| 40 | + $this->userManager = $this->createMock(IUserManager::class); |
|
| 41 | + $this->groupManager = $this->createMock(IGroupManager::class); |
|
| 42 | + $this->principalBackend = $this->createMock(Principal::class); |
|
| 43 | + $this->cacheFactory = $this->createMock(ICacheFactory::class); |
|
| 44 | + $this->shareCache = $this->createMock(ICache::class); |
|
| 45 | + $this->logger = $this->createMock(LoggerInterface::class); |
|
| 46 | + $this->calendarService = $this->createMock(Service::class); |
|
| 47 | + $this->cacheFactory->expects(self::any()) |
|
| 48 | + ->method('createInMemory') |
|
| 49 | + ->willReturn($this->shareCache); |
|
| 50 | + |
|
| 51 | + $this->backend = new CalendarSharingBackend( |
|
| 52 | + $this->userManager, |
|
| 53 | + $this->groupManager, |
|
| 54 | + $this->principalBackend, |
|
| 55 | + $this->cacheFactory, |
|
| 56 | + $this->calendarService, |
|
| 57 | + $this->logger, |
|
| 58 | + ); |
|
| 59 | + } |
|
| 60 | + |
|
| 61 | + public function testUpdateShareCalendarBob(): void { |
|
| 62 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 63 | + 'getOwner' => 'principals/users/alice', |
|
| 64 | + 'getResourceId' => 42, |
|
| 65 | + ]); |
|
| 66 | + $add = [ |
|
| 67 | + [ |
|
| 68 | + 'href' => 'principal:principals/users/bob', |
|
| 69 | + 'readOnly' => true, |
|
| 70 | + ] |
|
| 71 | + ]; |
|
| 72 | + $principal = 'principals/users/bob'; |
|
| 73 | + |
|
| 74 | + $this->shareCache->expects(self::once()) |
|
| 75 | + ->method('clear'); |
|
| 76 | + $this->principalBackend->expects(self::once()) |
|
| 77 | + ->method('findByUri') |
|
| 78 | + ->willReturn($principal); |
|
| 79 | + $this->userManager->expects(self::once()) |
|
| 80 | + ->method('userExists') |
|
| 81 | + ->willReturn(true); |
|
| 82 | + $this->groupManager->expects(self::never()) |
|
| 83 | + ->method('groupExists'); |
|
| 84 | + $this->calendarService->expects(self::once()) |
|
| 85 | + ->method('shareWith') |
|
| 86 | + ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 87 | + |
|
| 88 | + $this->backend->updateShares($shareable, $add, []); |
|
| 89 | + } |
|
| 90 | + |
|
| 91 | + public function testUpdateShareCalendarGroup(): void { |
|
| 92 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 93 | + 'getOwner' => 'principals/users/alice', |
|
| 94 | + 'getResourceId' => 42, |
|
| 95 | + ]); |
|
| 96 | + $add = [ |
|
| 97 | + [ |
|
| 98 | + 'href' => 'principal:principals/groups/bob', |
|
| 99 | + 'readOnly' => true, |
|
| 100 | + ] |
|
| 101 | + ]; |
|
| 102 | + $principal = 'principals/groups/bob'; |
|
| 103 | + |
|
| 104 | + $this->shareCache->expects(self::once()) |
|
| 105 | + ->method('clear'); |
|
| 106 | + $this->principalBackend->expects(self::once()) |
|
| 107 | + ->method('findByUri') |
|
| 108 | + ->willReturn($principal); |
|
| 109 | + $this->userManager->expects(self::never()) |
|
| 110 | + ->method('userExists'); |
|
| 111 | + $this->groupManager->expects(self::once()) |
|
| 112 | + ->method('groupExists') |
|
| 113 | + ->willReturn(true); |
|
| 114 | + $this->calendarService->expects(self::once()) |
|
| 115 | + ->method('shareWith') |
|
| 116 | + ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 117 | + |
|
| 118 | + $this->backend->updateShares($shareable, $add, []); |
|
| 119 | + } |
|
| 120 | + |
|
| 121 | + public function testUpdateShareContactsBob(): void { |
|
| 122 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 123 | + 'getOwner' => 'principals/users/alice', |
|
| 124 | + 'getResourceId' => 42, |
|
| 125 | + ]); |
|
| 126 | + $add = [ |
|
| 127 | + [ |
|
| 128 | + 'href' => 'principal:principals/users/bob', |
|
| 129 | + 'readOnly' => true, |
|
| 130 | + ] |
|
| 131 | + ]; |
|
| 132 | + $principal = 'principals/users/bob'; |
|
| 133 | + |
|
| 134 | + $this->shareCache->expects(self::once()) |
|
| 135 | + ->method('clear'); |
|
| 136 | + $this->principalBackend->expects(self::once()) |
|
| 137 | + ->method('findByUri') |
|
| 138 | + ->willReturn($principal); |
|
| 139 | + $this->userManager->expects(self::once()) |
|
| 140 | + ->method('userExists') |
|
| 141 | + ->willReturn(true); |
|
| 142 | + $this->groupManager->expects(self::never()) |
|
| 143 | + ->method('groupExists'); |
|
| 144 | + $this->calendarService->expects(self::once()) |
|
| 145 | + ->method('shareWith') |
|
| 146 | + ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 147 | + |
|
| 148 | + $this->backend->updateShares($shareable, $add, []); |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + public function testUpdateShareContactsGroup(): void { |
|
| 152 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 153 | + 'getOwner' => 'principals/users/alice', |
|
| 154 | + 'getResourceId' => 42, |
|
| 155 | + ]); |
|
| 156 | + $add = [ |
|
| 157 | + [ |
|
| 158 | + 'href' => 'principal:principals/groups/bob', |
|
| 159 | + 'readOnly' => true, |
|
| 160 | + ] |
|
| 161 | + ]; |
|
| 162 | + $principal = 'principals/groups/bob'; |
|
| 163 | + |
|
| 164 | + $this->shareCache->expects(self::once()) |
|
| 165 | + ->method('clear'); |
|
| 166 | + $this->principalBackend->expects(self::once()) |
|
| 167 | + ->method('findByUri') |
|
| 168 | + ->willReturn($principal); |
|
| 169 | + $this->userManager->expects(self::never()) |
|
| 170 | + ->method('userExists'); |
|
| 171 | + $this->groupManager->expects(self::once()) |
|
| 172 | + ->method('groupExists') |
|
| 173 | + ->willReturn(true); |
|
| 174 | + $this->calendarService->expects(self::once()) |
|
| 175 | + ->method('shareWith') |
|
| 176 | + ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 177 | + |
|
| 178 | + $this->backend->updateShares($shareable, $add, []); |
|
| 179 | + } |
|
| 180 | + |
|
| 181 | + public function testUpdateShareCircle(): void { |
|
| 182 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 183 | + 'getOwner' => 'principals/users/alice', |
|
| 184 | + 'getResourceId' => 42, |
|
| 185 | + ]); |
|
| 186 | + $add = [ |
|
| 187 | + [ |
|
| 188 | + 'href' => 'principal:principals/circles/bob', |
|
| 189 | + 'readOnly' => true, |
|
| 190 | + ] |
|
| 191 | + ]; |
|
| 192 | + $principal = 'principals/groups/bob'; |
|
| 193 | + |
|
| 194 | + $this->shareCache->expects(self::once()) |
|
| 195 | + ->method('clear'); |
|
| 196 | + $this->principalBackend->expects(self::once()) |
|
| 197 | + ->method('findByUri') |
|
| 198 | + ->willReturn($principal); |
|
| 199 | + $this->userManager->expects(self::never()) |
|
| 200 | + ->method('userExists'); |
|
| 201 | + $this->groupManager->expects(self::once()) |
|
| 202 | + ->method('groupExists') |
|
| 203 | + ->willReturn(true); |
|
| 204 | + $this->calendarService->expects(self::once()) |
|
| 205 | + ->method('shareWith') |
|
| 206 | + ->with($shareable->getResourceId(), $principal, Backend::ACCESS_READ); |
|
| 207 | + |
|
| 208 | + $this->backend->updateShares($shareable, $add, []); |
|
| 209 | + } |
|
| 210 | + |
|
| 211 | + public function testUnshareBob(): void { |
|
| 212 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 213 | + 'getOwner' => 'principals/users/alice', |
|
| 214 | + 'getResourceId' => 42, |
|
| 215 | + ]); |
|
| 216 | + $remove = [ |
|
| 217 | + 'principal:principals/users/bob', |
|
| 218 | + ]; |
|
| 219 | + $principal = 'principals/users/bob'; |
|
| 220 | + |
|
| 221 | + $this->shareCache->expects(self::once()) |
|
| 222 | + ->method('clear'); |
|
| 223 | + $this->principalBackend->expects(self::once()) |
|
| 224 | + ->method('findByUri') |
|
| 225 | + ->willReturn($principal); |
|
| 226 | + $this->calendarService->expects(self::once()) |
|
| 227 | + ->method('deleteShare') |
|
| 228 | + ->with($shareable->getResourceId(), $principal); |
|
| 229 | + $this->calendarService->expects(self::never()) |
|
| 230 | + ->method('unshare'); |
|
| 231 | + |
|
| 232 | + $this->backend->updateShares($shareable, [], $remove); |
|
| 233 | + } |
|
| 234 | + |
|
| 235 | + public function testUnshareWithBobGroup(): void { |
|
| 236 | + $shareable = $this->createConfiguredMock(IShareable::class, [ |
|
| 237 | + 'getOwner' => 'principals/users/alice', |
|
| 238 | + 'getResourceId' => 42, |
|
| 239 | + ]); |
|
| 240 | + $remove = [ |
|
| 241 | + 'principal:principals/users/bob', |
|
| 242 | + ]; |
|
| 243 | + $oldShares = [ |
|
| 244 | + [ |
|
| 245 | + 'href' => 'principal:principals/groups/bob', |
|
| 246 | + 'commonName' => 'bob', |
|
| 247 | + 'status' => 1, |
|
| 248 | + 'readOnly' => true, |
|
| 249 | + '{http://owncloud.org/ns}principal' => 'principals/groups/bob', |
|
| 250 | + '{http://owncloud.org/ns}group-share' => true, |
|
| 251 | + ] |
|
| 252 | + ]; |
|
| 253 | + |
|
| 254 | + |
|
| 255 | + $this->shareCache->expects(self::once()) |
|
| 256 | + ->method('clear'); |
|
| 257 | + $this->principalBackend->expects(self::once()) |
|
| 258 | + ->method('findByUri') |
|
| 259 | + ->willReturn('principals/users/bob'); |
|
| 260 | + $this->calendarService->expects(self::once()) |
|
| 261 | + ->method('deleteShare') |
|
| 262 | + ->with($shareable->getResourceId(), 'principals/users/bob'); |
|
| 263 | + $this->calendarService->expects(self::never()) |
|
| 264 | + ->method('unshare'); |
|
| 265 | + |
|
| 266 | + $this->backend->updateShares($shareable, [], $remove, $oldShares); |
|
| 267 | + } |
|
| 268 | + |
|
| 269 | + public function testGetShares(): void { |
|
| 270 | + $resourceId = 42; |
|
| 271 | + $principal = 'principals/groups/bob'; |
|
| 272 | + $rows = [ |
|
| 273 | + [ |
|
| 274 | + 'principaluri' => $principal, |
|
| 275 | + 'access' => Backend::ACCESS_READ, |
|
| 276 | + ] |
|
| 277 | + ]; |
|
| 278 | + $expected = [ |
|
| 279 | + [ |
|
| 280 | + 'href' => 'principal:principals/groups/bob', |
|
| 281 | + 'commonName' => 'bob', |
|
| 282 | + 'status' => 1, |
|
| 283 | + 'readOnly' => true, |
|
| 284 | + '{http://owncloud.org/ns}principal' => $principal, |
|
| 285 | + '{http://owncloud.org/ns}group-share' => true, |
|
| 286 | + ] |
|
| 287 | + ]; |
|
| 288 | + |
|
| 289 | + |
|
| 290 | + $this->shareCache->expects(self::once()) |
|
| 291 | + ->method('get') |
|
| 292 | + ->with((string)$resourceId) |
|
| 293 | + ->willReturn(null); |
|
| 294 | + $this->calendarService->expects(self::once()) |
|
| 295 | + ->method('getShares') |
|
| 296 | + ->with($resourceId) |
|
| 297 | + ->willReturn($rows); |
|
| 298 | + $this->principalBackend->expects(self::once()) |
|
| 299 | + ->method('getPrincipalByPath') |
|
| 300 | + ->with($principal) |
|
| 301 | + ->willReturn(['uri' => $principal, '{DAV:}displayname' => 'bob']); |
|
| 302 | + $this->shareCache->expects(self::once()) |
|
| 303 | + ->method('set') |
|
| 304 | + ->with((string)$resourceId, $expected); |
|
| 305 | + |
|
| 306 | + $result = $this->backend->getShares($resourceId); |
|
| 307 | + $this->assertEquals($expected, $result); |
|
| 308 | + } |
|
| 309 | + |
|
| 310 | + public function testGetSharesAddressbooks(): void { |
|
| 311 | + $service = $this->createMock(\OCA\DAV\CardDAV\Sharing\Service::class); |
|
| 312 | + $backend = new ContactsSharingBackend( |
|
| 313 | + $this->userManager, |
|
| 314 | + $this->groupManager, |
|
| 315 | + $this->principalBackend, |
|
| 316 | + $this->cacheFactory, |
|
| 317 | + $service, |
|
| 318 | + $this->logger); |
|
| 319 | + $resourceId = 42; |
|
| 320 | + $principal = 'principals/groups/bob'; |
|
| 321 | + $rows = [ |
|
| 322 | + [ |
|
| 323 | + 'principaluri' => $principal, |
|
| 324 | + 'access' => Backend::ACCESS_READ, |
|
| 325 | + ] |
|
| 326 | + ]; |
|
| 327 | + $expected = [ |
|
| 328 | + [ |
|
| 329 | + 'href' => 'principal:principals/groups/bob', |
|
| 330 | + 'commonName' => 'bob', |
|
| 331 | + 'status' => 1, |
|
| 332 | + 'readOnly' => true, |
|
| 333 | + '{http://owncloud.org/ns}principal' => $principal, |
|
| 334 | + '{http://owncloud.org/ns}group-share' => true, |
|
| 335 | + ] |
|
| 336 | + ]; |
|
| 337 | + |
|
| 338 | + $this->shareCache->expects(self::once()) |
|
| 339 | + ->method('get') |
|
| 340 | + ->with((string)$resourceId) |
|
| 341 | + ->willReturn(null); |
|
| 342 | + $service->expects(self::once()) |
|
| 343 | + ->method('getShares') |
|
| 344 | + ->with($resourceId) |
|
| 345 | + ->willReturn($rows); |
|
| 346 | + $this->principalBackend->expects(self::once()) |
|
| 347 | + ->method('getPrincipalByPath') |
|
| 348 | + ->with($principal) |
|
| 349 | + ->willReturn(['uri' => $principal, '{DAV:}displayname' => 'bob']); |
|
| 350 | + $this->shareCache->expects(self::once()) |
|
| 351 | + ->method('set') |
|
| 352 | + ->with((string)$resourceId, $expected); |
|
| 353 | + |
|
| 354 | + $result = $backend->getShares($resourceId); |
|
| 355 | + $this->assertEquals($expected, $result); |
|
| 356 | + } |
|
| 357 | + |
|
| 358 | + public function testPreloadShares(): void { |
|
| 359 | + $resourceIds = [42, 99]; |
|
| 360 | + $rows = [ |
|
| 361 | + [ |
|
| 362 | + 'resourceid' => 42, |
|
| 363 | + 'principaluri' => 'principals/groups/bob', |
|
| 364 | + 'access' => Backend::ACCESS_READ, |
|
| 365 | + ], |
|
| 366 | + [ |
|
| 367 | + 'resourceid' => 99, |
|
| 368 | + 'principaluri' => 'principals/users/carlos', |
|
| 369 | + 'access' => Backend::ACCESS_READ_WRITE, |
|
| 370 | + ] |
|
| 371 | + ]; |
|
| 372 | + $principalResults = [ |
|
| 373 | + ['uri' => 'principals/groups/bob', '{DAV:}displayname' => 'bob'], |
|
| 374 | + ['uri' => 'principals/users/carlos', '{DAV:}displayname' => 'carlos'], |
|
| 375 | + ]; |
|
| 376 | + |
|
| 377 | + $this->shareCache->expects(self::exactly(2)) |
|
| 378 | + ->method('get') |
|
| 379 | + ->willReturn(null); |
|
| 380 | + $this->calendarService->expects(self::once()) |
|
| 381 | + ->method('getSharesForIds') |
|
| 382 | + ->with($resourceIds) |
|
| 383 | + ->willReturn($rows); |
|
| 384 | + $this->principalBackend->expects(self::exactly(2)) |
|
| 385 | + ->method('getPrincipalByPath') |
|
| 386 | + ->willReturnCallback(function (string $principal) use ($principalResults) { |
|
| 387 | + switch ($principal) { |
|
| 388 | + case 'principals/groups/bob': |
|
| 389 | + return $principalResults[0]; |
|
| 390 | + default: |
|
| 391 | + return $principalResults[1]; |
|
| 392 | + } |
|
| 393 | + }); |
|
| 394 | + $this->shareCache->expects(self::exactly(2)) |
|
| 395 | + ->method('set'); |
|
| 396 | + |
|
| 397 | + $this->backend->preloadShares($resourceIds); |
|
| 398 | + } |
|
| 399 | 399 | } |
@@ -19,314 +19,314 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | class CalendarTest extends TestCase { |
| 21 | 21 | |
| 22 | - /** @var IL10N */ |
|
| 23 | - protected $l10n; |
|
| 24 | - |
|
| 25 | - /** @var IConfig */ |
|
| 26 | - protected $config; |
|
| 27 | - |
|
| 28 | - /** @var MockObject|LoggerInterface */ |
|
| 29 | - protected $logger; |
|
| 30 | - |
|
| 31 | - protected function setUp(): void { |
|
| 32 | - parent::setUp(); |
|
| 33 | - $this->l10n = $this->getMockBuilder(IL10N::class) |
|
| 34 | - ->disableOriginalConstructor()->getMock(); |
|
| 35 | - $this->config = $this->createMock(IConfig::class); |
|
| 36 | - $this->logger = $this->createMock(LoggerInterface::class); |
|
| 37 | - $this->l10n |
|
| 38 | - ->expects($this->any()) |
|
| 39 | - ->method('t') |
|
| 40 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 41 | - return vsprintf($text, $parameters); |
|
| 42 | - }); |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - public function testDelete(): void { |
|
| 46 | - /** @var CalDavBackend&MockObject $backend */ |
|
| 47 | - $backend = $this->createMock(CalDavBackend::class); |
|
| 48 | - $backend->expects($this->never()) |
|
| 49 | - ->method('updateShares'); |
|
| 50 | - $backend->expects($this->once()) |
|
| 51 | - ->method('unshare'); |
|
| 52 | - |
|
| 53 | - $calendarInfo = [ |
|
| 54 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 55 | - 'principaluri' => 'user2', |
|
| 56 | - 'id' => 666, |
|
| 57 | - 'uri' => 'cal', |
|
| 58 | - ]; |
|
| 59 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 60 | - $c->delete(); |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - |
|
| 64 | - public function testDeleteFromGroup(): void { |
|
| 65 | - /** @var CalDavBackend&MockObject $backend */ |
|
| 66 | - $backend = $this->createMock(CalDavBackend::class); |
|
| 67 | - $backend->expects($this->never()) |
|
| 68 | - ->method('updateShares'); |
|
| 69 | - $backend->expects($this->once()) |
|
| 70 | - ->method('unshare'); |
|
| 71 | - |
|
| 72 | - $calendarInfo = [ |
|
| 73 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 74 | - 'principaluri' => 'user2', |
|
| 75 | - 'id' => 666, |
|
| 76 | - 'uri' => 'cal', |
|
| 77 | - ]; |
|
| 78 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 79 | - $c->delete(); |
|
| 80 | - } |
|
| 81 | - |
|
| 82 | - public function testDeleteOwn(): void { |
|
| 83 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 84 | - $backend = $this->createMock(CalDavBackend::class); |
|
| 85 | - $backend->expects($this->never())->method('updateShares'); |
|
| 86 | - $backend->expects($this->never())->method('getShares'); |
|
| 87 | - |
|
| 88 | - $this->config->expects($this->never())->method('setUserValue'); |
|
| 89 | - |
|
| 90 | - $backend->expects($this->once())->method('deleteCalendar') |
|
| 91 | - ->with(666); |
|
| 92 | - |
|
| 93 | - $calendarInfo = [ |
|
| 94 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 95 | - 'principaluri' => 'user1', |
|
| 96 | - 'id' => 666, |
|
| 97 | - 'uri' => 'cal', |
|
| 98 | - ]; |
|
| 99 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 100 | - $c->delete(); |
|
| 101 | - } |
|
| 102 | - |
|
| 103 | - public function testDeleteBirthdayCalendar(): void { |
|
| 104 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 105 | - $backend = $this->createMock(CalDavBackend::class); |
|
| 106 | - $backend->expects($this->once())->method('deleteCalendar') |
|
| 107 | - ->with(666); |
|
| 108 | - |
|
| 109 | - $this->config->expects($this->once()) |
|
| 110 | - ->method('setUserValue') |
|
| 111 | - ->with('user1', 'dav', 'generateBirthdayCalendar', 'no'); |
|
| 112 | - |
|
| 113 | - $calendarInfo = [ |
|
| 114 | - '{http://owncloud.org/ns}owner-principal' => 'principals/users/user1', |
|
| 115 | - 'principaluri' => 'principals/users/user1', |
|
| 116 | - 'id' => 666, |
|
| 117 | - 'uri' => 'contact_birthdays', |
|
| 118 | - '{DAV:}displayname' => 'Test', |
|
| 119 | - ]; |
|
| 120 | - |
|
| 121 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 122 | - $c->delete(); |
|
| 123 | - } |
|
| 124 | - |
|
| 125 | - public function dataPropPatch() { |
|
| 126 | - return [ |
|
| 127 | - ['user1', 'user2', [], true], |
|
| 128 | - ['user1', 'user2', [ |
|
| 129 | - '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 130 | - ], true], |
|
| 131 | - ['user1', 'user2', [ |
|
| 132 | - '{DAV:}displayname' => true, |
|
| 133 | - ], true], |
|
| 134 | - ['user1', 'user2', [ |
|
| 135 | - '{DAV:}displayname' => true, |
|
| 136 | - '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 137 | - ], true], |
|
| 138 | - ['user1', 'user1', [], false], |
|
| 139 | - ['user1', 'user1', [ |
|
| 140 | - '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 141 | - ], false], |
|
| 142 | - ['user1', 'user1', [ |
|
| 143 | - '{DAV:}displayname' => true, |
|
| 144 | - ], false], |
|
| 145 | - ['user1', 'user1', [ |
|
| 146 | - '{DAV:}displayname' => true, |
|
| 147 | - '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 148 | - ], false], |
|
| 149 | - ]; |
|
| 150 | - } |
|
| 151 | - |
|
| 152 | - /** |
|
| 153 | - * @dataProvider dataPropPatch |
|
| 154 | - */ |
|
| 155 | - public function testPropPatch($ownerPrincipal, $principalUri, $mutations, $shared): void { |
|
| 156 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 157 | - $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 158 | - $calendarInfo = [ |
|
| 159 | - '{http://owncloud.org/ns}owner-principal' => $ownerPrincipal, |
|
| 160 | - 'principaluri' => $principalUri, |
|
| 161 | - 'id' => 666, |
|
| 162 | - 'uri' => 'default' |
|
| 163 | - ]; |
|
| 164 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 165 | - $propPatch = new PropPatch($mutations); |
|
| 166 | - |
|
| 167 | - if (!$shared) { |
|
| 168 | - $backend->expects($this->once()) |
|
| 169 | - ->method('updateCalendar') |
|
| 170 | - ->with(666, $propPatch); |
|
| 171 | - } |
|
| 172 | - $c->propPatch($propPatch); |
|
| 173 | - $this->addToAssertionCount(1); |
|
| 174 | - } |
|
| 175 | - |
|
| 176 | - /** |
|
| 177 | - * @dataProvider providesReadOnlyInfo |
|
| 178 | - */ |
|
| 179 | - public function testAcl($expectsWrite, $readOnlyValue, $hasOwnerSet, $uri = 'default'): void { |
|
| 180 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 181 | - $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 182 | - $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 183 | - $calendarInfo = [ |
|
| 184 | - 'principaluri' => 'user2', |
|
| 185 | - 'id' => 666, |
|
| 186 | - 'uri' => $uri |
|
| 187 | - ]; |
|
| 188 | - $calendarInfo['{DAV:}displayname'] = 'Test'; |
|
| 189 | - if (!is_null($readOnlyValue)) { |
|
| 190 | - $calendarInfo['{http://owncloud.org/ns}read-only'] = $readOnlyValue; |
|
| 191 | - } |
|
| 192 | - if ($hasOwnerSet) { |
|
| 193 | - $calendarInfo['{http://owncloud.org/ns}owner-principal'] = 'user1'; |
|
| 194 | - } |
|
| 195 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 196 | - $acl = $c->getACL(); |
|
| 197 | - $childAcl = $c->getChildACL(); |
|
| 198 | - |
|
| 199 | - $expectedAcl = [[ |
|
| 200 | - 'privilege' => '{DAV:}read', |
|
| 201 | - 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 202 | - 'protected' => true |
|
| 203 | - ], [ |
|
| 204 | - 'privilege' => '{DAV:}read', |
|
| 205 | - 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 206 | - 'protected' => true, |
|
| 207 | - ], [ |
|
| 208 | - 'privilege' => '{DAV:}read', |
|
| 209 | - 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-read', |
|
| 210 | - 'protected' => true, |
|
| 211 | - ]]; |
|
| 212 | - if ($uri === BirthdayService::BIRTHDAY_CALENDAR_URI) { |
|
| 213 | - $expectedAcl[] = [ |
|
| 214 | - 'privilege' => '{DAV:}write-properties', |
|
| 215 | - 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 216 | - 'protected' => true |
|
| 217 | - ]; |
|
| 218 | - $expectedAcl[] = [ |
|
| 219 | - 'privilege' => '{DAV:}write-properties', |
|
| 220 | - 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 221 | - 'protected' => true |
|
| 222 | - ]; |
|
| 223 | - } else { |
|
| 224 | - $expectedAcl[] = [ |
|
| 225 | - 'privilege' => '{DAV:}write', |
|
| 226 | - 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 227 | - 'protected' => true |
|
| 228 | - ]; |
|
| 229 | - $expectedAcl[] = [ |
|
| 230 | - 'privilege' => '{DAV:}write', |
|
| 231 | - 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 232 | - 'protected' => true |
|
| 233 | - ]; |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - $expectedAcl[] = [ |
|
| 237 | - 'privilege' => '{DAV:}write-properties', |
|
| 238 | - 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-read', |
|
| 239 | - 'protected' => true |
|
| 240 | - ]; |
|
| 241 | - |
|
| 242 | - if ($hasOwnerSet) { |
|
| 243 | - $expectedAcl[] = [ |
|
| 244 | - 'privilege' => '{DAV:}read', |
|
| 245 | - 'principal' => 'user2', |
|
| 246 | - 'protected' => true |
|
| 247 | - ]; |
|
| 248 | - if ($expectsWrite) { |
|
| 249 | - $expectedAcl[] = [ |
|
| 250 | - 'privilege' => '{DAV:}write', |
|
| 251 | - 'principal' => 'user2', |
|
| 252 | - 'protected' => true |
|
| 253 | - ]; |
|
| 254 | - } else { |
|
| 255 | - $expectedAcl[] = [ |
|
| 256 | - 'privilege' => '{DAV:}write-properties', |
|
| 257 | - 'principal' => 'user2', |
|
| 258 | - 'protected' => true |
|
| 259 | - ]; |
|
| 260 | - } |
|
| 261 | - } |
|
| 262 | - $this->assertEquals($expectedAcl, $acl); |
|
| 263 | - $this->assertEquals($expectedAcl, $childAcl); |
|
| 264 | - } |
|
| 265 | - |
|
| 266 | - public function providesReadOnlyInfo() { |
|
| 267 | - return [ |
|
| 268 | - 'read-only property not set' => [true, null, true], |
|
| 269 | - 'read-only property is false' => [true, false, true], |
|
| 270 | - 'read-only property is true' => [false, true, true], |
|
| 271 | - 'read-only property not set and no owner' => [true, null, false], |
|
| 272 | - 'read-only property is false and no owner' => [true, false, false], |
|
| 273 | - 'read-only property is true and no owner' => [false, true, false], |
|
| 274 | - 'birthday calendar' => [false, false, false, BirthdayService::BIRTHDAY_CALENDAR_URI] |
|
| 275 | - ]; |
|
| 276 | - } |
|
| 277 | - |
|
| 278 | - /** |
|
| 279 | - * @dataProvider providesConfidentialClassificationData |
|
| 280 | - * @param int $expectedChildren |
|
| 281 | - * @param bool $isShared |
|
| 282 | - */ |
|
| 283 | - public function testPrivateClassification($expectedChildren, $isShared): void { |
|
| 284 | - $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; |
|
| 285 | - $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL]; |
|
| 286 | - $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; |
|
| 287 | - |
|
| 288 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 289 | - $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 290 | - $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ |
|
| 291 | - $calObject0, $calObject1, $calObject2 |
|
| 292 | - ]); |
|
| 293 | - $backend->expects($this->any())->method('getMultipleCalendarObjects') |
|
| 294 | - ->with(666, ['event-0', 'event-1', 'event-2']) |
|
| 295 | - ->willReturn([ |
|
| 296 | - $calObject0, $calObject1, $calObject2 |
|
| 297 | - ]); |
|
| 298 | - $backend->expects($this->any())->method('getCalendarObject') |
|
| 299 | - ->willReturn($calObject2)->with(666, 'event-2'); |
|
| 300 | - $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 301 | - |
|
| 302 | - $calendarInfo = [ |
|
| 303 | - 'principaluri' => 'user2', |
|
| 304 | - 'id' => 666, |
|
| 305 | - 'uri' => 'cal', |
|
| 306 | - ]; |
|
| 307 | - |
|
| 308 | - if ($isShared) { |
|
| 309 | - $calendarInfo['{http://owncloud.org/ns}owner-principal'] = 'user1'; |
|
| 310 | - } |
|
| 311 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 312 | - $children = $c->getChildren(); |
|
| 313 | - $this->assertEquals($expectedChildren, count($children)); |
|
| 314 | - $children = $c->getMultipleChildren(['event-0', 'event-1', 'event-2']); |
|
| 315 | - $this->assertEquals($expectedChildren, count($children)); |
|
| 316 | - |
|
| 317 | - $this->assertEquals(!$isShared, $c->childExists('event-2')); |
|
| 318 | - } |
|
| 319 | - |
|
| 320 | - /** |
|
| 321 | - * @dataProvider providesConfidentialClassificationData |
|
| 322 | - * @param int $expectedChildren |
|
| 323 | - * @param bool $isShared |
|
| 324 | - */ |
|
| 325 | - public function testConfidentialClassification($expectedChildren, $isShared): void { |
|
| 326 | - $start = '20160609'; |
|
| 327 | - $end = '20160610'; |
|
| 328 | - |
|
| 329 | - $calData = <<<EOD |
|
| 22 | + /** @var IL10N */ |
|
| 23 | + protected $l10n; |
|
| 24 | + |
|
| 25 | + /** @var IConfig */ |
|
| 26 | + protected $config; |
|
| 27 | + |
|
| 28 | + /** @var MockObject|LoggerInterface */ |
|
| 29 | + protected $logger; |
|
| 30 | + |
|
| 31 | + protected function setUp(): void { |
|
| 32 | + parent::setUp(); |
|
| 33 | + $this->l10n = $this->getMockBuilder(IL10N::class) |
|
| 34 | + ->disableOriginalConstructor()->getMock(); |
|
| 35 | + $this->config = $this->createMock(IConfig::class); |
|
| 36 | + $this->logger = $this->createMock(LoggerInterface::class); |
|
| 37 | + $this->l10n |
|
| 38 | + ->expects($this->any()) |
|
| 39 | + ->method('t') |
|
| 40 | + ->willReturnCallback(function ($text, $parameters = []) { |
|
| 41 | + return vsprintf($text, $parameters); |
|
| 42 | + }); |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + public function testDelete(): void { |
|
| 46 | + /** @var CalDavBackend&MockObject $backend */ |
|
| 47 | + $backend = $this->createMock(CalDavBackend::class); |
|
| 48 | + $backend->expects($this->never()) |
|
| 49 | + ->method('updateShares'); |
|
| 50 | + $backend->expects($this->once()) |
|
| 51 | + ->method('unshare'); |
|
| 52 | + |
|
| 53 | + $calendarInfo = [ |
|
| 54 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 55 | + 'principaluri' => 'user2', |
|
| 56 | + 'id' => 666, |
|
| 57 | + 'uri' => 'cal', |
|
| 58 | + ]; |
|
| 59 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 60 | + $c->delete(); |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + |
|
| 64 | + public function testDeleteFromGroup(): void { |
|
| 65 | + /** @var CalDavBackend&MockObject $backend */ |
|
| 66 | + $backend = $this->createMock(CalDavBackend::class); |
|
| 67 | + $backend->expects($this->never()) |
|
| 68 | + ->method('updateShares'); |
|
| 69 | + $backend->expects($this->once()) |
|
| 70 | + ->method('unshare'); |
|
| 71 | + |
|
| 72 | + $calendarInfo = [ |
|
| 73 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 74 | + 'principaluri' => 'user2', |
|
| 75 | + 'id' => 666, |
|
| 76 | + 'uri' => 'cal', |
|
| 77 | + ]; |
|
| 78 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 79 | + $c->delete(); |
|
| 80 | + } |
|
| 81 | + |
|
| 82 | + public function testDeleteOwn(): void { |
|
| 83 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 84 | + $backend = $this->createMock(CalDavBackend::class); |
|
| 85 | + $backend->expects($this->never())->method('updateShares'); |
|
| 86 | + $backend->expects($this->never())->method('getShares'); |
|
| 87 | + |
|
| 88 | + $this->config->expects($this->never())->method('setUserValue'); |
|
| 89 | + |
|
| 90 | + $backend->expects($this->once())->method('deleteCalendar') |
|
| 91 | + ->with(666); |
|
| 92 | + |
|
| 93 | + $calendarInfo = [ |
|
| 94 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 95 | + 'principaluri' => 'user1', |
|
| 96 | + 'id' => 666, |
|
| 97 | + 'uri' => 'cal', |
|
| 98 | + ]; |
|
| 99 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 100 | + $c->delete(); |
|
| 101 | + } |
|
| 102 | + |
|
| 103 | + public function testDeleteBirthdayCalendar(): void { |
|
| 104 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 105 | + $backend = $this->createMock(CalDavBackend::class); |
|
| 106 | + $backend->expects($this->once())->method('deleteCalendar') |
|
| 107 | + ->with(666); |
|
| 108 | + |
|
| 109 | + $this->config->expects($this->once()) |
|
| 110 | + ->method('setUserValue') |
|
| 111 | + ->with('user1', 'dav', 'generateBirthdayCalendar', 'no'); |
|
| 112 | + |
|
| 113 | + $calendarInfo = [ |
|
| 114 | + '{http://owncloud.org/ns}owner-principal' => 'principals/users/user1', |
|
| 115 | + 'principaluri' => 'principals/users/user1', |
|
| 116 | + 'id' => 666, |
|
| 117 | + 'uri' => 'contact_birthdays', |
|
| 118 | + '{DAV:}displayname' => 'Test', |
|
| 119 | + ]; |
|
| 120 | + |
|
| 121 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 122 | + $c->delete(); |
|
| 123 | + } |
|
| 124 | + |
|
| 125 | + public function dataPropPatch() { |
|
| 126 | + return [ |
|
| 127 | + ['user1', 'user2', [], true], |
|
| 128 | + ['user1', 'user2', [ |
|
| 129 | + '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 130 | + ], true], |
|
| 131 | + ['user1', 'user2', [ |
|
| 132 | + '{DAV:}displayname' => true, |
|
| 133 | + ], true], |
|
| 134 | + ['user1', 'user2', [ |
|
| 135 | + '{DAV:}displayname' => true, |
|
| 136 | + '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 137 | + ], true], |
|
| 138 | + ['user1', 'user1', [], false], |
|
| 139 | + ['user1', 'user1', [ |
|
| 140 | + '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 141 | + ], false], |
|
| 142 | + ['user1', 'user1', [ |
|
| 143 | + '{DAV:}displayname' => true, |
|
| 144 | + ], false], |
|
| 145 | + ['user1', 'user1', [ |
|
| 146 | + '{DAV:}displayname' => true, |
|
| 147 | + '{http://owncloud.org/ns}calendar-enabled' => true, |
|
| 148 | + ], false], |
|
| 149 | + ]; |
|
| 150 | + } |
|
| 151 | + |
|
| 152 | + /** |
|
| 153 | + * @dataProvider dataPropPatch |
|
| 154 | + */ |
|
| 155 | + public function testPropPatch($ownerPrincipal, $principalUri, $mutations, $shared): void { |
|
| 156 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 157 | + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 158 | + $calendarInfo = [ |
|
| 159 | + '{http://owncloud.org/ns}owner-principal' => $ownerPrincipal, |
|
| 160 | + 'principaluri' => $principalUri, |
|
| 161 | + 'id' => 666, |
|
| 162 | + 'uri' => 'default' |
|
| 163 | + ]; |
|
| 164 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 165 | + $propPatch = new PropPatch($mutations); |
|
| 166 | + |
|
| 167 | + if (!$shared) { |
|
| 168 | + $backend->expects($this->once()) |
|
| 169 | + ->method('updateCalendar') |
|
| 170 | + ->with(666, $propPatch); |
|
| 171 | + } |
|
| 172 | + $c->propPatch($propPatch); |
|
| 173 | + $this->addToAssertionCount(1); |
|
| 174 | + } |
|
| 175 | + |
|
| 176 | + /** |
|
| 177 | + * @dataProvider providesReadOnlyInfo |
|
| 178 | + */ |
|
| 179 | + public function testAcl($expectsWrite, $readOnlyValue, $hasOwnerSet, $uri = 'default'): void { |
|
| 180 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 181 | + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 182 | + $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 183 | + $calendarInfo = [ |
|
| 184 | + 'principaluri' => 'user2', |
|
| 185 | + 'id' => 666, |
|
| 186 | + 'uri' => $uri |
|
| 187 | + ]; |
|
| 188 | + $calendarInfo['{DAV:}displayname'] = 'Test'; |
|
| 189 | + if (!is_null($readOnlyValue)) { |
|
| 190 | + $calendarInfo['{http://owncloud.org/ns}read-only'] = $readOnlyValue; |
|
| 191 | + } |
|
| 192 | + if ($hasOwnerSet) { |
|
| 193 | + $calendarInfo['{http://owncloud.org/ns}owner-principal'] = 'user1'; |
|
| 194 | + } |
|
| 195 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 196 | + $acl = $c->getACL(); |
|
| 197 | + $childAcl = $c->getChildACL(); |
|
| 198 | + |
|
| 199 | + $expectedAcl = [[ |
|
| 200 | + 'privilege' => '{DAV:}read', |
|
| 201 | + 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 202 | + 'protected' => true |
|
| 203 | + ], [ |
|
| 204 | + 'privilege' => '{DAV:}read', |
|
| 205 | + 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 206 | + 'protected' => true, |
|
| 207 | + ], [ |
|
| 208 | + 'privilege' => '{DAV:}read', |
|
| 209 | + 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-read', |
|
| 210 | + 'protected' => true, |
|
| 211 | + ]]; |
|
| 212 | + if ($uri === BirthdayService::BIRTHDAY_CALENDAR_URI) { |
|
| 213 | + $expectedAcl[] = [ |
|
| 214 | + 'privilege' => '{DAV:}write-properties', |
|
| 215 | + 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 216 | + 'protected' => true |
|
| 217 | + ]; |
|
| 218 | + $expectedAcl[] = [ |
|
| 219 | + 'privilege' => '{DAV:}write-properties', |
|
| 220 | + 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 221 | + 'protected' => true |
|
| 222 | + ]; |
|
| 223 | + } else { |
|
| 224 | + $expectedAcl[] = [ |
|
| 225 | + 'privilege' => '{DAV:}write', |
|
| 226 | + 'principal' => $hasOwnerSet ? 'user1' : 'user2', |
|
| 227 | + 'protected' => true |
|
| 228 | + ]; |
|
| 229 | + $expectedAcl[] = [ |
|
| 230 | + 'privilege' => '{DAV:}write', |
|
| 231 | + 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-write', |
|
| 232 | + 'protected' => true |
|
| 233 | + ]; |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + $expectedAcl[] = [ |
|
| 237 | + 'privilege' => '{DAV:}write-properties', |
|
| 238 | + 'principal' => ($hasOwnerSet ? 'user1' : 'user2') . '/calendar-proxy-read', |
|
| 239 | + 'protected' => true |
|
| 240 | + ]; |
|
| 241 | + |
|
| 242 | + if ($hasOwnerSet) { |
|
| 243 | + $expectedAcl[] = [ |
|
| 244 | + 'privilege' => '{DAV:}read', |
|
| 245 | + 'principal' => 'user2', |
|
| 246 | + 'protected' => true |
|
| 247 | + ]; |
|
| 248 | + if ($expectsWrite) { |
|
| 249 | + $expectedAcl[] = [ |
|
| 250 | + 'privilege' => '{DAV:}write', |
|
| 251 | + 'principal' => 'user2', |
|
| 252 | + 'protected' => true |
|
| 253 | + ]; |
|
| 254 | + } else { |
|
| 255 | + $expectedAcl[] = [ |
|
| 256 | + 'privilege' => '{DAV:}write-properties', |
|
| 257 | + 'principal' => 'user2', |
|
| 258 | + 'protected' => true |
|
| 259 | + ]; |
|
| 260 | + } |
|
| 261 | + } |
|
| 262 | + $this->assertEquals($expectedAcl, $acl); |
|
| 263 | + $this->assertEquals($expectedAcl, $childAcl); |
|
| 264 | + } |
|
| 265 | + |
|
| 266 | + public function providesReadOnlyInfo() { |
|
| 267 | + return [ |
|
| 268 | + 'read-only property not set' => [true, null, true], |
|
| 269 | + 'read-only property is false' => [true, false, true], |
|
| 270 | + 'read-only property is true' => [false, true, true], |
|
| 271 | + 'read-only property not set and no owner' => [true, null, false], |
|
| 272 | + 'read-only property is false and no owner' => [true, false, false], |
|
| 273 | + 'read-only property is true and no owner' => [false, true, false], |
|
| 274 | + 'birthday calendar' => [false, false, false, BirthdayService::BIRTHDAY_CALENDAR_URI] |
|
| 275 | + ]; |
|
| 276 | + } |
|
| 277 | + |
|
| 278 | + /** |
|
| 279 | + * @dataProvider providesConfidentialClassificationData |
|
| 280 | + * @param int $expectedChildren |
|
| 281 | + * @param bool $isShared |
|
| 282 | + */ |
|
| 283 | + public function testPrivateClassification($expectedChildren, $isShared): void { |
|
| 284 | + $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; |
|
| 285 | + $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL]; |
|
| 286 | + $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; |
|
| 287 | + |
|
| 288 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 289 | + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 290 | + $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ |
|
| 291 | + $calObject0, $calObject1, $calObject2 |
|
| 292 | + ]); |
|
| 293 | + $backend->expects($this->any())->method('getMultipleCalendarObjects') |
|
| 294 | + ->with(666, ['event-0', 'event-1', 'event-2']) |
|
| 295 | + ->willReturn([ |
|
| 296 | + $calObject0, $calObject1, $calObject2 |
|
| 297 | + ]); |
|
| 298 | + $backend->expects($this->any())->method('getCalendarObject') |
|
| 299 | + ->willReturn($calObject2)->with(666, 'event-2'); |
|
| 300 | + $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 301 | + |
|
| 302 | + $calendarInfo = [ |
|
| 303 | + 'principaluri' => 'user2', |
|
| 304 | + 'id' => 666, |
|
| 305 | + 'uri' => 'cal', |
|
| 306 | + ]; |
|
| 307 | + |
|
| 308 | + if ($isShared) { |
|
| 309 | + $calendarInfo['{http://owncloud.org/ns}owner-principal'] = 'user1'; |
|
| 310 | + } |
|
| 311 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 312 | + $children = $c->getChildren(); |
|
| 313 | + $this->assertEquals($expectedChildren, count($children)); |
|
| 314 | + $children = $c->getMultipleChildren(['event-0', 'event-1', 'event-2']); |
|
| 315 | + $this->assertEquals($expectedChildren, count($children)); |
|
| 316 | + |
|
| 317 | + $this->assertEquals(!$isShared, $c->childExists('event-2')); |
|
| 318 | + } |
|
| 319 | + |
|
| 320 | + /** |
|
| 321 | + * @dataProvider providesConfidentialClassificationData |
|
| 322 | + * @param int $expectedChildren |
|
| 323 | + * @param bool $isShared |
|
| 324 | + */ |
|
| 325 | + public function testConfidentialClassification($expectedChildren, $isShared): void { |
|
| 326 | + $start = '20160609'; |
|
| 327 | + $end = '20160610'; |
|
| 328 | + |
|
| 329 | + $calData = <<<EOD |
|
| 330 | 330 | BEGIN:VCALENDAR |
| 331 | 331 | PRODID:-//ownCloud calendar v1.2.2 |
| 332 | 332 | BEGIN:VEVENT |
@@ -368,84 +368,84 @@ discard block |
||
| 368 | 368 | END:VCALENDAR |
| 369 | 369 | EOD; |
| 370 | 370 | |
| 371 | - $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; |
|
| 372 | - $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'calendardata' => $calData]; |
|
| 373 | - $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; |
|
| 374 | - |
|
| 375 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 376 | - $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 377 | - $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ |
|
| 378 | - $calObject0, $calObject1, $calObject2 |
|
| 379 | - ]); |
|
| 380 | - $backend->expects($this->any())->method('getMultipleCalendarObjects') |
|
| 381 | - ->with(666, ['event-0', 'event-1', 'event-2']) |
|
| 382 | - ->willReturn([ |
|
| 383 | - $calObject0, $calObject1, $calObject2 |
|
| 384 | - ]); |
|
| 385 | - $backend->expects($this->any())->method('getCalendarObject') |
|
| 386 | - ->willReturn($calObject1)->with(666, 'event-1'); |
|
| 387 | - $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 388 | - |
|
| 389 | - $calendarInfo = [ |
|
| 390 | - '{http://owncloud.org/ns}owner-principal' => $isShared ? 'user1' : 'user2', |
|
| 391 | - 'principaluri' => 'user2', |
|
| 392 | - 'id' => 666, |
|
| 393 | - 'uri' => 'cal', |
|
| 394 | - ]; |
|
| 395 | - $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 396 | - |
|
| 397 | - $this->assertEquals(count($c->getChildren()), $expectedChildren); |
|
| 398 | - |
|
| 399 | - // test private event |
|
| 400 | - $privateEvent = $c->getChild('event-1'); |
|
| 401 | - $calData = $privateEvent->get(); |
|
| 402 | - $event = Reader::read($calData); |
|
| 403 | - |
|
| 404 | - $this->assertEquals($start, $event->VEVENT->DTSTART->getValue()); |
|
| 405 | - $this->assertEquals($end, $event->VEVENT->DTEND->getValue()); |
|
| 406 | - |
|
| 407 | - if ($isShared) { |
|
| 408 | - $this->assertEquals('Busy', $event->VEVENT->SUMMARY->getValue()); |
|
| 409 | - $this->assertArrayNotHasKey('ATTENDEE', $event->VEVENT); |
|
| 410 | - $this->assertArrayNotHasKey('LOCATION', $event->VEVENT); |
|
| 411 | - $this->assertArrayNotHasKey('DESCRIPTION', $event->VEVENT); |
|
| 412 | - $this->assertArrayNotHasKey('ORGANIZER', $event->VEVENT); |
|
| 413 | - } else { |
|
| 414 | - $this->assertEquals('Test Event', $event->VEVENT->SUMMARY->getValue()); |
|
| 415 | - } |
|
| 416 | - |
|
| 417 | - // Test l10n |
|
| 418 | - $l10n = $this->createMock(IL10N::class); |
|
| 419 | - if ($isShared) { |
|
| 420 | - $l10n->expects($this->once()) |
|
| 421 | - ->method('t') |
|
| 422 | - ->with('Busy') |
|
| 423 | - ->willReturn('Translated busy'); |
|
| 424 | - } else { |
|
| 425 | - $l10n->expects($this->never()) |
|
| 426 | - ->method('t'); |
|
| 427 | - } |
|
| 428 | - $c = new Calendar($backend, $calendarInfo, $l10n, $this->config, $this->logger); |
|
| 429 | - |
|
| 430 | - $calData = $c->getChild('event-1')->get(); |
|
| 431 | - $event = Reader::read($calData); |
|
| 432 | - |
|
| 433 | - if ($isShared) { |
|
| 434 | - $this->assertEquals('Translated busy', $event->VEVENT->SUMMARY->getValue()); |
|
| 435 | - } else { |
|
| 436 | - $this->assertEquals('Test Event', $event->VEVENT->SUMMARY->getValue()); |
|
| 437 | - } |
|
| 438 | - } |
|
| 439 | - |
|
| 440 | - public function providesConfidentialClassificationData() { |
|
| 441 | - return [ |
|
| 442 | - [3, false], |
|
| 443 | - [2, true] |
|
| 444 | - ]; |
|
| 445 | - } |
|
| 446 | - |
|
| 447 | - public function testRemoveVAlarms(): void { |
|
| 448 | - $publicObjectData = <<<EOD |
|
| 371 | + $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; |
|
| 372 | + $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'calendardata' => $calData]; |
|
| 373 | + $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; |
|
| 374 | + |
|
| 375 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 376 | + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); |
|
| 377 | + $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ |
|
| 378 | + $calObject0, $calObject1, $calObject2 |
|
| 379 | + ]); |
|
| 380 | + $backend->expects($this->any())->method('getMultipleCalendarObjects') |
|
| 381 | + ->with(666, ['event-0', 'event-1', 'event-2']) |
|
| 382 | + ->willReturn([ |
|
| 383 | + $calObject0, $calObject1, $calObject2 |
|
| 384 | + ]); |
|
| 385 | + $backend->expects($this->any())->method('getCalendarObject') |
|
| 386 | + ->willReturn($calObject1)->with(666, 'event-1'); |
|
| 387 | + $backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1); |
|
| 388 | + |
|
| 389 | + $calendarInfo = [ |
|
| 390 | + '{http://owncloud.org/ns}owner-principal' => $isShared ? 'user1' : 'user2', |
|
| 391 | + 'principaluri' => 'user2', |
|
| 392 | + 'id' => 666, |
|
| 393 | + 'uri' => 'cal', |
|
| 394 | + ]; |
|
| 395 | + $c = new Calendar($backend, $calendarInfo, $this->l10n, $this->config, $this->logger); |
|
| 396 | + |
|
| 397 | + $this->assertEquals(count($c->getChildren()), $expectedChildren); |
|
| 398 | + |
|
| 399 | + // test private event |
|
| 400 | + $privateEvent = $c->getChild('event-1'); |
|
| 401 | + $calData = $privateEvent->get(); |
|
| 402 | + $event = Reader::read($calData); |
|
| 403 | + |
|
| 404 | + $this->assertEquals($start, $event->VEVENT->DTSTART->getValue()); |
|
| 405 | + $this->assertEquals($end, $event->VEVENT->DTEND->getValue()); |
|
| 406 | + |
|
| 407 | + if ($isShared) { |
|
| 408 | + $this->assertEquals('Busy', $event->VEVENT->SUMMARY->getValue()); |
|
| 409 | + $this->assertArrayNotHasKey('ATTENDEE', $event->VEVENT); |
|
| 410 | + $this->assertArrayNotHasKey('LOCATION', $event->VEVENT); |
|
| 411 | + $this->assertArrayNotHasKey('DESCRIPTION', $event->VEVENT); |
|
| 412 | + $this->assertArrayNotHasKey('ORGANIZER', $event->VEVENT); |
|
| 413 | + } else { |
|
| 414 | + $this->assertEquals('Test Event', $event->VEVENT->SUMMARY->getValue()); |
|
| 415 | + } |
|
| 416 | + |
|
| 417 | + // Test l10n |
|
| 418 | + $l10n = $this->createMock(IL10N::class); |
|
| 419 | + if ($isShared) { |
|
| 420 | + $l10n->expects($this->once()) |
|
| 421 | + ->method('t') |
|
| 422 | + ->with('Busy') |
|
| 423 | + ->willReturn('Translated busy'); |
|
| 424 | + } else { |
|
| 425 | + $l10n->expects($this->never()) |
|
| 426 | + ->method('t'); |
|
| 427 | + } |
|
| 428 | + $c = new Calendar($backend, $calendarInfo, $l10n, $this->config, $this->logger); |
|
| 429 | + |
|
| 430 | + $calData = $c->getChild('event-1')->get(); |
|
| 431 | + $event = Reader::read($calData); |
|
| 432 | + |
|
| 433 | + if ($isShared) { |
|
| 434 | + $this->assertEquals('Translated busy', $event->VEVENT->SUMMARY->getValue()); |
|
| 435 | + } else { |
|
| 436 | + $this->assertEquals('Test Event', $event->VEVENT->SUMMARY->getValue()); |
|
| 437 | + } |
|
| 438 | + } |
|
| 439 | + |
|
| 440 | + public function providesConfidentialClassificationData() { |
|
| 441 | + return [ |
|
| 442 | + [3, false], |
|
| 443 | + [2, true] |
|
| 444 | + ]; |
|
| 445 | + } |
|
| 446 | + |
|
| 447 | + public function testRemoveVAlarms(): void { |
|
| 448 | + $publicObjectData = <<<EOD |
|
| 449 | 449 | BEGIN:VCALENDAR |
| 450 | 450 | VERSION:2.0 |
| 451 | 451 | PRODID:-//Nextcloud calendar v1.5.6 |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | EOD; |
| 471 | 471 | |
| 472 | - $confidentialObjectData = <<<EOD |
|
| 472 | + $confidentialObjectData = <<<EOD |
|
| 473 | 473 | BEGIN:VCALENDAR |
| 474 | 474 | VERSION:2.0 |
| 475 | 475 | PRODID:-//Nextcloud calendar v1.5.6 |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | |
| 494 | 494 | EOD; |
| 495 | 495 | |
| 496 | - $publicObjectDataWithoutVAlarm = <<<EOD |
|
| 496 | + $publicObjectDataWithoutVAlarm = <<<EOD |
|
| 497 | 497 | BEGIN:VCALENDAR |
| 498 | 498 | VERSION:2.0 |
| 499 | 499 | PRODID:-//Nextcloud calendar v1.5.6 |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | |
| 514 | 514 | EOD; |
| 515 | 515 | |
| 516 | - $confidentialObjectCleaned = <<<EOD |
|
| 516 | + $confidentialObjectCleaned = <<<EOD |
|
| 517 | 517 | BEGIN:VCALENDAR |
| 518 | 518 | VERSION:2.0 |
| 519 | 519 | PRODID:-//Nextcloud calendar v1.5.6 |
@@ -532,94 +532,94 @@ discard block |
||
| 532 | 532 | |
| 533 | 533 | |
| 534 | 534 | |
| 535 | - $publicObject = ['uri' => 'event-0', |
|
| 536 | - 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC, |
|
| 537 | - 'calendardata' => $publicObjectData]; |
|
| 538 | - |
|
| 539 | - $confidentialObject = ['uri' => 'event-1', |
|
| 540 | - 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, |
|
| 541 | - 'calendardata' => $confidentialObjectData]; |
|
| 542 | - |
|
| 543 | - /** @var MockObject | CalDavBackend $backend */ |
|
| 544 | - $backend = $this->createMock(CalDavBackend::class); |
|
| 545 | - $backend->expects($this->any()) |
|
| 546 | - ->method('getCalendarObjects') |
|
| 547 | - ->willReturn([$publicObject, $confidentialObject]); |
|
| 548 | - |
|
| 549 | - $backend->expects($this->any()) |
|
| 550 | - ->method('getMultipleCalendarObjects') |
|
| 551 | - ->with(666, ['event-0', 'event-1']) |
|
| 552 | - ->willReturn([$publicObject, $confidentialObject]); |
|
| 553 | - |
|
| 554 | - $backend->expects($this->any()) |
|
| 555 | - ->method('getCalendarObject') |
|
| 556 | - ->willReturnCallback(function ($cId, $uri) use ($publicObject, $confidentialObject) { |
|
| 557 | - switch ($uri) { |
|
| 558 | - case 'event-0': |
|
| 559 | - return $publicObject; |
|
| 560 | - |
|
| 561 | - case 'event-1': |
|
| 562 | - return $confidentialObject; |
|
| 563 | - |
|
| 564 | - default: |
|
| 565 | - throw new \Exception('unexpected uri'); |
|
| 566 | - } |
|
| 567 | - }); |
|
| 568 | - |
|
| 569 | - $backend->expects($this->any()) |
|
| 570 | - ->method('applyShareAcl') |
|
| 571 | - ->willReturnArgument(1); |
|
| 572 | - |
|
| 573 | - $calendarInfoOwner = [ |
|
| 574 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 575 | - 'principaluri' => 'user1', |
|
| 576 | - 'id' => 666, |
|
| 577 | - 'uri' => 'cal', |
|
| 578 | - ]; |
|
| 579 | - $calendarInfoSharedRW = [ |
|
| 580 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 581 | - 'principaluri' => 'user2', |
|
| 582 | - 'id' => 666, |
|
| 583 | - 'uri' => 'cal', |
|
| 584 | - ]; |
|
| 585 | - $calendarInfoSharedRO = [ |
|
| 586 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 587 | - '{http://owncloud.org/ns}read-only' => true, |
|
| 588 | - 'principaluri' => 'user2', |
|
| 589 | - 'id' => 666, |
|
| 590 | - 'uri' => 'cal', |
|
| 591 | - ]; |
|
| 592 | - |
|
| 593 | - $ownerCalendar = new Calendar($backend, $calendarInfoOwner, $this->l10n, $this->config, $this->logger); |
|
| 594 | - $rwCalendar = new Calendar($backend, $calendarInfoSharedRW, $this->l10n, $this->config, $this->logger); |
|
| 595 | - $roCalendar = new Calendar($backend, $calendarInfoSharedRO, $this->l10n, $this->config, $this->logger); |
|
| 596 | - |
|
| 597 | - $this->assertCount(2, $ownerCalendar->getChildren()); |
|
| 598 | - $this->assertCount(2, $rwCalendar->getChildren()); |
|
| 599 | - $this->assertCount(2, $roCalendar->getChildren()); |
|
| 600 | - |
|
| 601 | - // calendar data shall not be altered for the owner |
|
| 602 | - $this->assertEquals($ownerCalendar->getChild('event-0')->get(), $publicObjectData); |
|
| 603 | - $this->assertEquals($ownerCalendar->getChild('event-1')->get(), $confidentialObjectData); |
|
| 604 | - |
|
| 605 | - // valarms shall not be removed for read-write shares |
|
| 606 | - $this->assertEquals( |
|
| 607 | - $this->fixLinebreak($rwCalendar->getChild('event-0')->get()), |
|
| 608 | - $this->fixLinebreak($publicObjectData)); |
|
| 609 | - $this->assertEquals( |
|
| 610 | - $this->fixLinebreak($rwCalendar->getChild('event-1')->get()), |
|
| 611 | - $this->fixLinebreak($confidentialObjectCleaned)); |
|
| 612 | - |
|
| 613 | - // valarms shall be removed for read-only shares |
|
| 614 | - $this->assertEquals( |
|
| 615 | - $this->fixLinebreak($roCalendar->getChild('event-0')->get()), |
|
| 616 | - $this->fixLinebreak($publicObjectDataWithoutVAlarm)); |
|
| 617 | - $this->assertEquals( |
|
| 618 | - $this->fixLinebreak($roCalendar->getChild('event-1')->get()), |
|
| 619 | - $this->fixLinebreak($confidentialObjectCleaned)); |
|
| 620 | - } |
|
| 621 | - |
|
| 622 | - private function fixLinebreak($str) { |
|
| 623 | - return preg_replace('~(*BSR_ANYCRLF)\R~', "\r\n", $str); |
|
| 624 | - } |
|
| 535 | + $publicObject = ['uri' => 'event-0', |
|
| 536 | + 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC, |
|
| 537 | + 'calendardata' => $publicObjectData]; |
|
| 538 | + |
|
| 539 | + $confidentialObject = ['uri' => 'event-1', |
|
| 540 | + 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, |
|
| 541 | + 'calendardata' => $confidentialObjectData]; |
|
| 542 | + |
|
| 543 | + /** @var MockObject | CalDavBackend $backend */ |
|
| 544 | + $backend = $this->createMock(CalDavBackend::class); |
|
| 545 | + $backend->expects($this->any()) |
|
| 546 | + ->method('getCalendarObjects') |
|
| 547 | + ->willReturn([$publicObject, $confidentialObject]); |
|
| 548 | + |
|
| 549 | + $backend->expects($this->any()) |
|
| 550 | + ->method('getMultipleCalendarObjects') |
|
| 551 | + ->with(666, ['event-0', 'event-1']) |
|
| 552 | + ->willReturn([$publicObject, $confidentialObject]); |
|
| 553 | + |
|
| 554 | + $backend->expects($this->any()) |
|
| 555 | + ->method('getCalendarObject') |
|
| 556 | + ->willReturnCallback(function ($cId, $uri) use ($publicObject, $confidentialObject) { |
|
| 557 | + switch ($uri) { |
|
| 558 | + case 'event-0': |
|
| 559 | + return $publicObject; |
|
| 560 | + |
|
| 561 | + case 'event-1': |
|
| 562 | + return $confidentialObject; |
|
| 563 | + |
|
| 564 | + default: |
|
| 565 | + throw new \Exception('unexpected uri'); |
|
| 566 | + } |
|
| 567 | + }); |
|
| 568 | + |
|
| 569 | + $backend->expects($this->any()) |
|
| 570 | + ->method('applyShareAcl') |
|
| 571 | + ->willReturnArgument(1); |
|
| 572 | + |
|
| 573 | + $calendarInfoOwner = [ |
|
| 574 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 575 | + 'principaluri' => 'user1', |
|
| 576 | + 'id' => 666, |
|
| 577 | + 'uri' => 'cal', |
|
| 578 | + ]; |
|
| 579 | + $calendarInfoSharedRW = [ |
|
| 580 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 581 | + 'principaluri' => 'user2', |
|
| 582 | + 'id' => 666, |
|
| 583 | + 'uri' => 'cal', |
|
| 584 | + ]; |
|
| 585 | + $calendarInfoSharedRO = [ |
|
| 586 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 587 | + '{http://owncloud.org/ns}read-only' => true, |
|
| 588 | + 'principaluri' => 'user2', |
|
| 589 | + 'id' => 666, |
|
| 590 | + 'uri' => 'cal', |
|
| 591 | + ]; |
|
| 592 | + |
|
| 593 | + $ownerCalendar = new Calendar($backend, $calendarInfoOwner, $this->l10n, $this->config, $this->logger); |
|
| 594 | + $rwCalendar = new Calendar($backend, $calendarInfoSharedRW, $this->l10n, $this->config, $this->logger); |
|
| 595 | + $roCalendar = new Calendar($backend, $calendarInfoSharedRO, $this->l10n, $this->config, $this->logger); |
|
| 596 | + |
|
| 597 | + $this->assertCount(2, $ownerCalendar->getChildren()); |
|
| 598 | + $this->assertCount(2, $rwCalendar->getChildren()); |
|
| 599 | + $this->assertCount(2, $roCalendar->getChildren()); |
|
| 600 | + |
|
| 601 | + // calendar data shall not be altered for the owner |
|
| 602 | + $this->assertEquals($ownerCalendar->getChild('event-0')->get(), $publicObjectData); |
|
| 603 | + $this->assertEquals($ownerCalendar->getChild('event-1')->get(), $confidentialObjectData); |
|
| 604 | + |
|
| 605 | + // valarms shall not be removed for read-write shares |
|
| 606 | + $this->assertEquals( |
|
| 607 | + $this->fixLinebreak($rwCalendar->getChild('event-0')->get()), |
|
| 608 | + $this->fixLinebreak($publicObjectData)); |
|
| 609 | + $this->assertEquals( |
|
| 610 | + $this->fixLinebreak($rwCalendar->getChild('event-1')->get()), |
|
| 611 | + $this->fixLinebreak($confidentialObjectCleaned)); |
|
| 612 | + |
|
| 613 | + // valarms shall be removed for read-only shares |
|
| 614 | + $this->assertEquals( |
|
| 615 | + $this->fixLinebreak($roCalendar->getChild('event-0')->get()), |
|
| 616 | + $this->fixLinebreak($publicObjectDataWithoutVAlarm)); |
|
| 617 | + $this->assertEquals( |
|
| 618 | + $this->fixLinebreak($roCalendar->getChild('event-1')->get()), |
|
| 619 | + $this->fixLinebreak($confidentialObjectCleaned)); |
|
| 620 | + } |
|
| 621 | + |
|
| 622 | + private function fixLinebreak($str) { |
|
| 623 | + return preg_replace('~(*BSR_ANYCRLF)\R~', "\r\n", $str); |
|
| 624 | + } |
|
| 625 | 625 | } |
@@ -32,128 +32,128 @@ discard block |
||
| 32 | 32 | * @package OCA\DAV\Tests\unit\CalDAV |
| 33 | 33 | */ |
| 34 | 34 | class CalDavBackendTest extends AbstractCalDavBackend { |
| 35 | - public function testCalendarOperations(): void { |
|
| 36 | - $calendarId = $this->createTestCalendar(); |
|
| 37 | - |
|
| 38 | - // update its display name |
|
| 39 | - $patch = new PropPatch([ |
|
| 40 | - '{DAV:}displayname' => 'Unit test', |
|
| 41 | - '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar used for unit testing' |
|
| 42 | - ]); |
|
| 43 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 44 | - ->method('dispatchTyped'); |
|
| 45 | - $this->backend->updateCalendar($calendarId, $patch); |
|
| 46 | - $patch->commit(); |
|
| 47 | - $this->assertEquals(1, $this->backend->getCalendarsForUserCount(self::UNIT_TEST_USER)); |
|
| 48 | - $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 49 | - $this->assertCount(1, $calendars); |
|
| 50 | - $this->assertEquals('Unit test', $calendars[0]['{DAV:}displayname']); |
|
| 51 | - $this->assertEquals('Calendar used for unit testing', $calendars[0]['{urn:ietf:params:xml:ns:caldav}calendar-description']); |
|
| 52 | - $this->assertEquals('User\'s displayname', $calendars[0]['{http://nextcloud.com/ns}owner-displayname']); |
|
| 53 | - |
|
| 54 | - // delete the address book |
|
| 55 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 56 | - ->method('dispatchTyped'); |
|
| 57 | - $this->backend->deleteCalendar($calendars[0]['id'], true); |
|
| 58 | - $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 59 | - self::assertEmpty($calendars); |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - public function providesSharingData() { |
|
| 63 | - return [ |
|
| 64 | - [true, true, true, false, [ |
|
| 65 | - [ |
|
| 66 | - 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 67 | - 'readOnly' => false |
|
| 68 | - ], |
|
| 69 | - [ |
|
| 70 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 71 | - 'readOnly' => true |
|
| 72 | - ] |
|
| 73 | - ], [ |
|
| 74 | - self::UNIT_TEST_USER1, |
|
| 75 | - self::UNIT_TEST_GROUP, |
|
| 76 | - ]], |
|
| 77 | - [true, true, true, false, [ |
|
| 78 | - [ |
|
| 79 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 80 | - 'readOnly' => true, |
|
| 81 | - ], |
|
| 82 | - [ |
|
| 83 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 84 | - 'readOnly' => false, |
|
| 85 | - ], |
|
| 86 | - ], [ |
|
| 87 | - self::UNIT_TEST_GROUP, |
|
| 88 | - self::UNIT_TEST_GROUP2, |
|
| 89 | - ]], |
|
| 90 | - [true, true, true, true, [ |
|
| 91 | - [ |
|
| 92 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 93 | - 'readOnly' => false, |
|
| 94 | - ], |
|
| 95 | - [ |
|
| 96 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 97 | - 'readOnly' => true, |
|
| 98 | - ], |
|
| 99 | - ], [ |
|
| 100 | - self::UNIT_TEST_GROUP, |
|
| 101 | - self::UNIT_TEST_GROUP2, |
|
| 102 | - ]], |
|
| 103 | - [true, false, false, false, [ |
|
| 104 | - [ |
|
| 105 | - 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 106 | - 'readOnly' => true |
|
| 107 | - ], |
|
| 108 | - ], [ |
|
| 109 | - self::UNIT_TEST_USER1, |
|
| 110 | - ]], |
|
| 111 | - |
|
| 112 | - ]; |
|
| 113 | - } |
|
| 114 | - |
|
| 115 | - /** |
|
| 116 | - * @dataProvider providesSharingData |
|
| 117 | - */ |
|
| 118 | - public function testCalendarSharing($userCanRead, $userCanWrite, $groupCanRead, $groupCanWrite, $add, $principals): void { |
|
| 119 | - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 120 | - $config = $this->createMock(IConfig::class); |
|
| 121 | - |
|
| 122 | - $l10n = $this->createMock(IL10N::class); |
|
| 123 | - $l10n->expects($this->any()) |
|
| 124 | - ->method('t') |
|
| 125 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 126 | - return vsprintf($text, $parameters); |
|
| 127 | - }); |
|
| 128 | - |
|
| 129 | - $this->userManager->expects($this->any()) |
|
| 130 | - ->method('userExists') |
|
| 131 | - ->willReturn(true); |
|
| 132 | - $this->groupManager->expects($this->any()) |
|
| 133 | - ->method('groupExists') |
|
| 134 | - ->willReturn(true); |
|
| 135 | - $this->principal->expects(self::atLeastOnce()) |
|
| 136 | - ->method('findByUri') |
|
| 137 | - ->willReturnOnConsecutiveCalls(...$principals); |
|
| 138 | - |
|
| 139 | - $calendarId = $this->createTestCalendar(); |
|
| 140 | - $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 141 | - $this->assertCount(1, $calendars); |
|
| 142 | - $calendar = new Calendar($this->backend, $calendars[0], $l10n, $config, $logger); |
|
| 143 | - $this->backend->updateShares($calendar, $add, []); |
|
| 144 | - $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1); |
|
| 145 | - $this->assertCount(1, $calendars); |
|
| 146 | - $calendar = new Calendar($this->backend, $calendars[0], $l10n, $config, $logger); |
|
| 147 | - $acl = $calendar->getACL(); |
|
| 148 | - $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}read', $acl); |
|
| 149 | - $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}write', $acl); |
|
| 150 | - $this->assertAccess($userCanRead, self::UNIT_TEST_USER1, '{DAV:}read', $acl); |
|
| 151 | - $this->assertAccess($userCanWrite, self::UNIT_TEST_USER1, '{DAV:}write', $acl); |
|
| 152 | - $this->assertEquals(self::UNIT_TEST_USER, $calendar->getOwner()); |
|
| 153 | - |
|
| 154 | - // test acls on the child |
|
| 155 | - $uri = static::getUniqueID('calobj'); |
|
| 156 | - $calData = <<<'EOD' |
|
| 35 | + public function testCalendarOperations(): void { |
|
| 36 | + $calendarId = $this->createTestCalendar(); |
|
| 37 | + |
|
| 38 | + // update its display name |
|
| 39 | + $patch = new PropPatch([ |
|
| 40 | + '{DAV:}displayname' => 'Unit test', |
|
| 41 | + '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar used for unit testing' |
|
| 42 | + ]); |
|
| 43 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 44 | + ->method('dispatchTyped'); |
|
| 45 | + $this->backend->updateCalendar($calendarId, $patch); |
|
| 46 | + $patch->commit(); |
|
| 47 | + $this->assertEquals(1, $this->backend->getCalendarsForUserCount(self::UNIT_TEST_USER)); |
|
| 48 | + $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 49 | + $this->assertCount(1, $calendars); |
|
| 50 | + $this->assertEquals('Unit test', $calendars[0]['{DAV:}displayname']); |
|
| 51 | + $this->assertEquals('Calendar used for unit testing', $calendars[0]['{urn:ietf:params:xml:ns:caldav}calendar-description']); |
|
| 52 | + $this->assertEquals('User\'s displayname', $calendars[0]['{http://nextcloud.com/ns}owner-displayname']); |
|
| 53 | + |
|
| 54 | + // delete the address book |
|
| 55 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 56 | + ->method('dispatchTyped'); |
|
| 57 | + $this->backend->deleteCalendar($calendars[0]['id'], true); |
|
| 58 | + $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 59 | + self::assertEmpty($calendars); |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + public function providesSharingData() { |
|
| 63 | + return [ |
|
| 64 | + [true, true, true, false, [ |
|
| 65 | + [ |
|
| 66 | + 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 67 | + 'readOnly' => false |
|
| 68 | + ], |
|
| 69 | + [ |
|
| 70 | + 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 71 | + 'readOnly' => true |
|
| 72 | + ] |
|
| 73 | + ], [ |
|
| 74 | + self::UNIT_TEST_USER1, |
|
| 75 | + self::UNIT_TEST_GROUP, |
|
| 76 | + ]], |
|
| 77 | + [true, true, true, false, [ |
|
| 78 | + [ |
|
| 79 | + 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 80 | + 'readOnly' => true, |
|
| 81 | + ], |
|
| 82 | + [ |
|
| 83 | + 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 84 | + 'readOnly' => false, |
|
| 85 | + ], |
|
| 86 | + ], [ |
|
| 87 | + self::UNIT_TEST_GROUP, |
|
| 88 | + self::UNIT_TEST_GROUP2, |
|
| 89 | + ]], |
|
| 90 | + [true, true, true, true, [ |
|
| 91 | + [ |
|
| 92 | + 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 93 | + 'readOnly' => false, |
|
| 94 | + ], |
|
| 95 | + [ |
|
| 96 | + 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 97 | + 'readOnly' => true, |
|
| 98 | + ], |
|
| 99 | + ], [ |
|
| 100 | + self::UNIT_TEST_GROUP, |
|
| 101 | + self::UNIT_TEST_GROUP2, |
|
| 102 | + ]], |
|
| 103 | + [true, false, false, false, [ |
|
| 104 | + [ |
|
| 105 | + 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 106 | + 'readOnly' => true |
|
| 107 | + ], |
|
| 108 | + ], [ |
|
| 109 | + self::UNIT_TEST_USER1, |
|
| 110 | + ]], |
|
| 111 | + |
|
| 112 | + ]; |
|
| 113 | + } |
|
| 114 | + |
|
| 115 | + /** |
|
| 116 | + * @dataProvider providesSharingData |
|
| 117 | + */ |
|
| 118 | + public function testCalendarSharing($userCanRead, $userCanWrite, $groupCanRead, $groupCanWrite, $add, $principals): void { |
|
| 119 | + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 120 | + $config = $this->createMock(IConfig::class); |
|
| 121 | + |
|
| 122 | + $l10n = $this->createMock(IL10N::class); |
|
| 123 | + $l10n->expects($this->any()) |
|
| 124 | + ->method('t') |
|
| 125 | + ->willReturnCallback(function ($text, $parameters = []) { |
|
| 126 | + return vsprintf($text, $parameters); |
|
| 127 | + }); |
|
| 128 | + |
|
| 129 | + $this->userManager->expects($this->any()) |
|
| 130 | + ->method('userExists') |
|
| 131 | + ->willReturn(true); |
|
| 132 | + $this->groupManager->expects($this->any()) |
|
| 133 | + ->method('groupExists') |
|
| 134 | + ->willReturn(true); |
|
| 135 | + $this->principal->expects(self::atLeastOnce()) |
|
| 136 | + ->method('findByUri') |
|
| 137 | + ->willReturnOnConsecutiveCalls(...$principals); |
|
| 138 | + |
|
| 139 | + $calendarId = $this->createTestCalendar(); |
|
| 140 | + $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 141 | + $this->assertCount(1, $calendars); |
|
| 142 | + $calendar = new Calendar($this->backend, $calendars[0], $l10n, $config, $logger); |
|
| 143 | + $this->backend->updateShares($calendar, $add, []); |
|
| 144 | + $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1); |
|
| 145 | + $this->assertCount(1, $calendars); |
|
| 146 | + $calendar = new Calendar($this->backend, $calendars[0], $l10n, $config, $logger); |
|
| 147 | + $acl = $calendar->getACL(); |
|
| 148 | + $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}read', $acl); |
|
| 149 | + $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}write', $acl); |
|
| 150 | + $this->assertAccess($userCanRead, self::UNIT_TEST_USER1, '{DAV:}read', $acl); |
|
| 151 | + $this->assertAccess($userCanWrite, self::UNIT_TEST_USER1, '{DAV:}write', $acl); |
|
| 152 | + $this->assertEquals(self::UNIT_TEST_USER, $calendar->getOwner()); |
|
| 153 | + |
|
| 154 | + // test acls on the child |
|
| 155 | + $uri = static::getUniqueID('calobj'); |
|
| 156 | + $calData = <<<'EOD' |
|
| 157 | 157 | BEGIN:VCALENDAR |
| 158 | 158 | VERSION:2.0 |
| 159 | 159 | PRODID:ownCloud Calendar |
@@ -170,35 +170,35 @@ discard block |
||
| 170 | 170 | END:VCALENDAR |
| 171 | 171 | EOD; |
| 172 | 172 | |
| 173 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 174 | - ->method('dispatchTyped'); |
|
| 175 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 176 | - |
|
| 177 | - /** @var IACL $child */ |
|
| 178 | - $child = $calendar->getChild($uri); |
|
| 179 | - $acl = $child->getACL(); |
|
| 180 | - $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}read', $acl); |
|
| 181 | - $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}write', $acl); |
|
| 182 | - $this->assertAccess($userCanRead, self::UNIT_TEST_USER1, '{DAV:}read', $acl); |
|
| 183 | - $this->assertAccess($userCanWrite, self::UNIT_TEST_USER1, '{DAV:}write', $acl); |
|
| 184 | - |
|
| 185 | - // delete the calendar |
|
| 186 | - $this->dispatcher->expects(self::once()) |
|
| 187 | - ->method('dispatchTyped') |
|
| 188 | - ->with(self::callback(function ($event) { |
|
| 189 | - return $event instanceof CalendarDeletedEvent; |
|
| 190 | - })); |
|
| 191 | - $this->backend->deleteCalendar($calendars[0]['id'], true); |
|
| 192 | - $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 193 | - self::assertEmpty($calendars); |
|
| 194 | - } |
|
| 195 | - |
|
| 196 | - public function testCalendarObjectsOperations(): void { |
|
| 197 | - $calendarId = $this->createTestCalendar(); |
|
| 198 | - |
|
| 199 | - // create a card |
|
| 200 | - $uri = static::getUniqueID('calobj'); |
|
| 201 | - $calData = <<<'EOD' |
|
| 173 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 174 | + ->method('dispatchTyped'); |
|
| 175 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 176 | + |
|
| 177 | + /** @var IACL $child */ |
|
| 178 | + $child = $calendar->getChild($uri); |
|
| 179 | + $acl = $child->getACL(); |
|
| 180 | + $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}read', $acl); |
|
| 181 | + $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}write', $acl); |
|
| 182 | + $this->assertAccess($userCanRead, self::UNIT_TEST_USER1, '{DAV:}read', $acl); |
|
| 183 | + $this->assertAccess($userCanWrite, self::UNIT_TEST_USER1, '{DAV:}write', $acl); |
|
| 184 | + |
|
| 185 | + // delete the calendar |
|
| 186 | + $this->dispatcher->expects(self::once()) |
|
| 187 | + ->method('dispatchTyped') |
|
| 188 | + ->with(self::callback(function ($event) { |
|
| 189 | + return $event instanceof CalendarDeletedEvent; |
|
| 190 | + })); |
|
| 191 | + $this->backend->deleteCalendar($calendars[0]['id'], true); |
|
| 192 | + $calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); |
|
| 193 | + self::assertEmpty($calendars); |
|
| 194 | + } |
|
| 195 | + |
|
| 196 | + public function testCalendarObjectsOperations(): void { |
|
| 197 | + $calendarId = $this->createTestCalendar(); |
|
| 198 | + |
|
| 199 | + // create a card |
|
| 200 | + $uri = static::getUniqueID('calobj'); |
|
| 201 | + $calData = <<<'EOD' |
|
| 202 | 202 | BEGIN:VCALENDAR |
| 203 | 203 | VERSION:2.0 |
| 204 | 204 | PRODID:ownCloud Calendar |
@@ -215,30 +215,30 @@ discard block |
||
| 215 | 215 | END:VCALENDAR |
| 216 | 216 | EOD; |
| 217 | 217 | |
| 218 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 219 | - ->method('dispatchTyped'); |
|
| 220 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 221 | - |
|
| 222 | - // get all the calendar objects |
|
| 223 | - $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 224 | - $this->assertCount(1, $calendarObjects); |
|
| 225 | - $this->assertEquals($calendarId, $calendarObjects[0]['calendarid']); |
|
| 226 | - $this->assertArrayHasKey('classification', $calendarObjects[0]); |
|
| 227 | - |
|
| 228 | - // get the calendar objects |
|
| 229 | - $calendarObject = $this->backend->getCalendarObject($calendarId, $uri); |
|
| 230 | - $this->assertNotNull($calendarObject); |
|
| 231 | - $this->assertArrayHasKey('id', $calendarObject); |
|
| 232 | - $this->assertArrayHasKey('uri', $calendarObject); |
|
| 233 | - $this->assertArrayHasKey('lastmodified', $calendarObject); |
|
| 234 | - $this->assertArrayHasKey('etag', $calendarObject); |
|
| 235 | - $this->assertArrayHasKey('size', $calendarObject); |
|
| 236 | - $this->assertArrayHasKey('classification', $calendarObject); |
|
| 237 | - $this->assertArrayHasKey('{' . SharingPlugin::NS_NEXTCLOUD . '}deleted-at', $calendarObject); |
|
| 238 | - $this->assertEquals($calData, $calendarObject['calendardata']); |
|
| 239 | - |
|
| 240 | - // update the card |
|
| 241 | - $calData = <<<'EOD' |
|
| 218 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 219 | + ->method('dispatchTyped'); |
|
| 220 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 221 | + |
|
| 222 | + // get all the calendar objects |
|
| 223 | + $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 224 | + $this->assertCount(1, $calendarObjects); |
|
| 225 | + $this->assertEquals($calendarId, $calendarObjects[0]['calendarid']); |
|
| 226 | + $this->assertArrayHasKey('classification', $calendarObjects[0]); |
|
| 227 | + |
|
| 228 | + // get the calendar objects |
|
| 229 | + $calendarObject = $this->backend->getCalendarObject($calendarId, $uri); |
|
| 230 | + $this->assertNotNull($calendarObject); |
|
| 231 | + $this->assertArrayHasKey('id', $calendarObject); |
|
| 232 | + $this->assertArrayHasKey('uri', $calendarObject); |
|
| 233 | + $this->assertArrayHasKey('lastmodified', $calendarObject); |
|
| 234 | + $this->assertArrayHasKey('etag', $calendarObject); |
|
| 235 | + $this->assertArrayHasKey('size', $calendarObject); |
|
| 236 | + $this->assertArrayHasKey('classification', $calendarObject); |
|
| 237 | + $this->assertArrayHasKey('{' . SharingPlugin::NS_NEXTCLOUD . '}deleted-at', $calendarObject); |
|
| 238 | + $this->assertEquals($calData, $calendarObject['calendardata']); |
|
| 239 | + |
|
| 240 | + // update the card |
|
| 241 | + $calData = <<<'EOD' |
|
| 242 | 242 | BEGIN:VCALENDAR |
| 243 | 243 | VERSION:2.0 |
| 244 | 244 | PRODID:ownCloud Calendar |
@@ -253,28 +253,28 @@ discard block |
||
| 253 | 253 | END:VEVENT |
| 254 | 254 | END:VCALENDAR |
| 255 | 255 | EOD; |
| 256 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 257 | - ->method('dispatchTyped'); |
|
| 258 | - $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 259 | - $calendarObject = $this->backend->getCalendarObject($calendarId, $uri); |
|
| 260 | - $this->assertEquals($calData, $calendarObject['calendardata']); |
|
| 256 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 257 | + ->method('dispatchTyped'); |
|
| 258 | + $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 259 | + $calendarObject = $this->backend->getCalendarObject($calendarId, $uri); |
|
| 260 | + $this->assertEquals($calData, $calendarObject['calendardata']); |
|
| 261 | 261 | |
| 262 | - // delete the card |
|
| 263 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 264 | - ->method('dispatchTyped'); |
|
| 265 | - $this->backend->deleteCalendarObject($calendarId, $uri); |
|
| 266 | - $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 267 | - $this->assertCount(0, $calendarObjects); |
|
| 268 | - } |
|
| 262 | + // delete the card |
|
| 263 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 264 | + ->method('dispatchTyped'); |
|
| 265 | + $this->backend->deleteCalendarObject($calendarId, $uri); |
|
| 266 | + $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 267 | + $this->assertCount(0, $calendarObjects); |
|
| 268 | + } |
|
| 269 | 269 | |
| 270 | 270 | |
| 271 | - public function testMultipleCalendarObjectsWithSameUID(): void { |
|
| 272 | - $this->expectException(\Sabre\DAV\Exception\BadRequest::class); |
|
| 273 | - $this->expectExceptionMessage('Calendar object with uid already exists in this calendar collection.'); |
|
| 271 | + public function testMultipleCalendarObjectsWithSameUID(): void { |
|
| 272 | + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); |
|
| 273 | + $this->expectExceptionMessage('Calendar object with uid already exists in this calendar collection.'); |
|
| 274 | 274 | |
| 275 | - $calendarId = $this->createTestCalendar(); |
|
| 275 | + $calendarId = $this->createTestCalendar(); |
|
| 276 | 276 | |
| 277 | - $calData = <<<'EOD' |
|
| 277 | + $calData = <<<'EOD' |
|
| 278 | 278 | BEGIN:VCALENDAR |
| 279 | 279 | VERSION:2.0 |
| 280 | 280 | PRODID:ownCloud Calendar |
@@ -291,18 +291,18 @@ discard block |
||
| 291 | 291 | END:VCALENDAR |
| 292 | 292 | EOD; |
| 293 | 293 | |
| 294 | - $uri0 = static::getUniqueID('event'); |
|
| 295 | - $uri1 = static::getUniqueID('event'); |
|
| 296 | - $this->backend->createCalendarObject($calendarId, $uri0, $calData); |
|
| 297 | - $this->backend->createCalendarObject($calendarId, $uri1, $calData); |
|
| 298 | - } |
|
| 294 | + $uri0 = static::getUniqueID('event'); |
|
| 295 | + $uri1 = static::getUniqueID('event'); |
|
| 296 | + $this->backend->createCalendarObject($calendarId, $uri0, $calData); |
|
| 297 | + $this->backend->createCalendarObject($calendarId, $uri1, $calData); |
|
| 298 | + } |
|
| 299 | 299 | |
| 300 | - public function testMultiCalendarObjects(): void { |
|
| 301 | - $calendarId = $this->createTestCalendar(); |
|
| 300 | + public function testMultiCalendarObjects(): void { |
|
| 301 | + $calendarId = $this->createTestCalendar(); |
|
| 302 | 302 | |
| 303 | - // create an event |
|
| 304 | - $calData = []; |
|
| 305 | - $calData[] = <<<'EOD' |
|
| 303 | + // create an event |
|
| 304 | + $calData = []; |
|
| 305 | + $calData[] = <<<'EOD' |
|
| 306 | 306 | BEGIN:VCALENDAR |
| 307 | 307 | VERSION:2.0 |
| 308 | 308 | PRODID:ownCloud Calendar |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | END:VCALENDAR |
| 320 | 320 | EOD; |
| 321 | 321 | |
| 322 | - $calData[] = <<<'EOD' |
|
| 322 | + $calData[] = <<<'EOD' |
|
| 323 | 323 | BEGIN:VCALENDAR |
| 324 | 324 | VERSION:2.0 |
| 325 | 325 | PRODID:ownCloud Calendar |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | END:VCALENDAR |
| 337 | 337 | EOD; |
| 338 | 338 | |
| 339 | - $calData[] = <<<'EOD' |
|
| 339 | + $calData[] = <<<'EOD' |
|
| 340 | 340 | BEGIN:VCALENDAR |
| 341 | 341 | VERSION:2.0 |
| 342 | 342 | PRODID:ownCloud Calendar |
@@ -353,88 +353,88 @@ discard block |
||
| 353 | 353 | END:VCALENDAR |
| 354 | 354 | EOD; |
| 355 | 355 | |
| 356 | - $uri0 = static::getUniqueID('card'); |
|
| 357 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 358 | - ->method('dispatchTyped'); |
|
| 359 | - $this->backend->createCalendarObject($calendarId, $uri0, $calData[0]); |
|
| 360 | - $uri1 = static::getUniqueID('card'); |
|
| 361 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 362 | - ->method('dispatchTyped'); |
|
| 363 | - $this->backend->createCalendarObject($calendarId, $uri1, $calData[1]); |
|
| 364 | - $uri2 = static::getUniqueID('card'); |
|
| 365 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 366 | - ->method('dispatchTyped'); |
|
| 367 | - $this->backend->createCalendarObject($calendarId, $uri2, $calData[2]); |
|
| 368 | - |
|
| 369 | - // get all the cards |
|
| 370 | - $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 371 | - $this->assertCount(3, $calendarObjects); |
|
| 372 | - |
|
| 373 | - // get the cards |
|
| 374 | - $calendarObjects = $this->backend->getMultipleCalendarObjects($calendarId, [$uri1, $uri2]); |
|
| 375 | - $this->assertCount(2, $calendarObjects); |
|
| 376 | - foreach ($calendarObjects as $card) { |
|
| 377 | - $this->assertArrayHasKey('id', $card); |
|
| 378 | - $this->assertArrayHasKey('uri', $card); |
|
| 379 | - $this->assertArrayHasKey('lastmodified', $card); |
|
| 380 | - $this->assertArrayHasKey('etag', $card); |
|
| 381 | - $this->assertArrayHasKey('size', $card); |
|
| 382 | - $this->assertArrayHasKey('classification', $card); |
|
| 383 | - } |
|
| 384 | - |
|
| 385 | - usort($calendarObjects, function ($a, $b) { |
|
| 386 | - return $a['id'] - $b['id']; |
|
| 387 | - }); |
|
| 388 | - |
|
| 389 | - $this->assertEquals($calData[1], $calendarObjects[0]['calendardata']); |
|
| 390 | - $this->assertEquals($calData[2], $calendarObjects[1]['calendardata']); |
|
| 391 | - |
|
| 392 | - // delete the card |
|
| 393 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 394 | - ->method('dispatchTyped'); |
|
| 395 | - $this->backend->deleteCalendarObject($calendarId, $uri0); |
|
| 396 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 397 | - ->method('dispatchTyped'); |
|
| 398 | - $this->backend->deleteCalendarObject($calendarId, $uri1); |
|
| 399 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 400 | - ->method('dispatchTyped'); |
|
| 401 | - $this->backend->deleteCalendarObject($calendarId, $uri2); |
|
| 402 | - $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 403 | - $this->assertCount(0, $calendarObjects); |
|
| 404 | - } |
|
| 405 | - |
|
| 406 | - /** |
|
| 407 | - * @dataProvider providesCalendarQueryParameters |
|
| 408 | - */ |
|
| 409 | - public function testCalendarQuery($expectedEventsInResult, $propFilters, $compFilter): void { |
|
| 410 | - $calendarId = $this->createTestCalendar(); |
|
| 411 | - $events = []; |
|
| 412 | - $events[0] = $this->createEvent($calendarId, '20130912T130000Z', '20130912T140000Z'); |
|
| 413 | - $events[1] = $this->createEvent($calendarId, '20130912T150000Z', '20130912T170000Z'); |
|
| 414 | - $events[2] = $this->createEvent($calendarId, '20130912T173000Z', '20130912T220000Z'); |
|
| 415 | - if (PHP_INT_SIZE > 8) { |
|
| 416 | - $events[3] = $this->createEvent($calendarId, '21130912T130000Z', '22130912T130000Z'); |
|
| 417 | - } else { |
|
| 418 | - /* On 32bit we do not support events after 2038 */ |
|
| 419 | - $events[3] = $this->createEvent($calendarId, '20370912T130000Z', '20370912T130000Z'); |
|
| 420 | - } |
|
| 421 | - |
|
| 422 | - $result = $this->backend->calendarQuery($calendarId, [ |
|
| 423 | - 'name' => '', |
|
| 424 | - 'prop-filters' => $propFilters, |
|
| 425 | - 'comp-filters' => $compFilter |
|
| 426 | - ]); |
|
| 427 | - |
|
| 428 | - $expectedEventsInResult = array_map(function ($index) use ($events) { |
|
| 429 | - return $events[$index]; |
|
| 430 | - }, $expectedEventsInResult); |
|
| 431 | - $this->assertEqualsCanonicalizing($expectedEventsInResult, $result); |
|
| 432 | - } |
|
| 433 | - |
|
| 434 | - public function testGetCalendarObjectByUID(): void { |
|
| 435 | - $calendarId = $this->createTestCalendar(); |
|
| 436 | - $uri = static::getUniqueID('calobj'); |
|
| 437 | - $calData = <<<'EOD' |
|
| 356 | + $uri0 = static::getUniqueID('card'); |
|
| 357 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 358 | + ->method('dispatchTyped'); |
|
| 359 | + $this->backend->createCalendarObject($calendarId, $uri0, $calData[0]); |
|
| 360 | + $uri1 = static::getUniqueID('card'); |
|
| 361 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 362 | + ->method('dispatchTyped'); |
|
| 363 | + $this->backend->createCalendarObject($calendarId, $uri1, $calData[1]); |
|
| 364 | + $uri2 = static::getUniqueID('card'); |
|
| 365 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 366 | + ->method('dispatchTyped'); |
|
| 367 | + $this->backend->createCalendarObject($calendarId, $uri2, $calData[2]); |
|
| 368 | + |
|
| 369 | + // get all the cards |
|
| 370 | + $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 371 | + $this->assertCount(3, $calendarObjects); |
|
| 372 | + |
|
| 373 | + // get the cards |
|
| 374 | + $calendarObjects = $this->backend->getMultipleCalendarObjects($calendarId, [$uri1, $uri2]); |
|
| 375 | + $this->assertCount(2, $calendarObjects); |
|
| 376 | + foreach ($calendarObjects as $card) { |
|
| 377 | + $this->assertArrayHasKey('id', $card); |
|
| 378 | + $this->assertArrayHasKey('uri', $card); |
|
| 379 | + $this->assertArrayHasKey('lastmodified', $card); |
|
| 380 | + $this->assertArrayHasKey('etag', $card); |
|
| 381 | + $this->assertArrayHasKey('size', $card); |
|
| 382 | + $this->assertArrayHasKey('classification', $card); |
|
| 383 | + } |
|
| 384 | + |
|
| 385 | + usort($calendarObjects, function ($a, $b) { |
|
| 386 | + return $a['id'] - $b['id']; |
|
| 387 | + }); |
|
| 388 | + |
|
| 389 | + $this->assertEquals($calData[1], $calendarObjects[0]['calendardata']); |
|
| 390 | + $this->assertEquals($calData[2], $calendarObjects[1]['calendardata']); |
|
| 391 | + |
|
| 392 | + // delete the card |
|
| 393 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 394 | + ->method('dispatchTyped'); |
|
| 395 | + $this->backend->deleteCalendarObject($calendarId, $uri0); |
|
| 396 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 397 | + ->method('dispatchTyped'); |
|
| 398 | + $this->backend->deleteCalendarObject($calendarId, $uri1); |
|
| 399 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 400 | + ->method('dispatchTyped'); |
|
| 401 | + $this->backend->deleteCalendarObject($calendarId, $uri2); |
|
| 402 | + $calendarObjects = $this->backend->getCalendarObjects($calendarId); |
|
| 403 | + $this->assertCount(0, $calendarObjects); |
|
| 404 | + } |
|
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * @dataProvider providesCalendarQueryParameters |
|
| 408 | + */ |
|
| 409 | + public function testCalendarQuery($expectedEventsInResult, $propFilters, $compFilter): void { |
|
| 410 | + $calendarId = $this->createTestCalendar(); |
|
| 411 | + $events = []; |
|
| 412 | + $events[0] = $this->createEvent($calendarId, '20130912T130000Z', '20130912T140000Z'); |
|
| 413 | + $events[1] = $this->createEvent($calendarId, '20130912T150000Z', '20130912T170000Z'); |
|
| 414 | + $events[2] = $this->createEvent($calendarId, '20130912T173000Z', '20130912T220000Z'); |
|
| 415 | + if (PHP_INT_SIZE > 8) { |
|
| 416 | + $events[3] = $this->createEvent($calendarId, '21130912T130000Z', '22130912T130000Z'); |
|
| 417 | + } else { |
|
| 418 | + /* On 32bit we do not support events after 2038 */ |
|
| 419 | + $events[3] = $this->createEvent($calendarId, '20370912T130000Z', '20370912T130000Z'); |
|
| 420 | + } |
|
| 421 | + |
|
| 422 | + $result = $this->backend->calendarQuery($calendarId, [ |
|
| 423 | + 'name' => '', |
|
| 424 | + 'prop-filters' => $propFilters, |
|
| 425 | + 'comp-filters' => $compFilter |
|
| 426 | + ]); |
|
| 427 | + |
|
| 428 | + $expectedEventsInResult = array_map(function ($index) use ($events) { |
|
| 429 | + return $events[$index]; |
|
| 430 | + }, $expectedEventsInResult); |
|
| 431 | + $this->assertEqualsCanonicalizing($expectedEventsInResult, $result); |
|
| 432 | + } |
|
| 433 | + |
|
| 434 | + public function testGetCalendarObjectByUID(): void { |
|
| 435 | + $calendarId = $this->createTestCalendar(); |
|
| 436 | + $uri = static::getUniqueID('calobj'); |
|
| 437 | + $calData = <<<'EOD' |
|
| 438 | 438 | BEGIN:VCALENDAR |
| 439 | 439 | VERSION:2.0 |
| 440 | 440 | PRODID:ownCloud Calendar |
@@ -452,175 +452,175 @@ discard block |
||
| 452 | 452 | EOD; |
| 453 | 453 | |
| 454 | 454 | |
| 455 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 456 | - |
|
| 457 | - $co = $this->backend->getCalendarObjectByUID(self::UNIT_TEST_USER, '47d15e3ec8'); |
|
| 458 | - $this->assertNotNull($co); |
|
| 459 | - } |
|
| 460 | - |
|
| 461 | - public function providesCalendarQueryParameters() { |
|
| 462 | - return [ |
|
| 463 | - 'all' => [[0, 1, 2, 3], [], []], |
|
| 464 | - 'only-todos' => [[], ['name' => 'VTODO'], []], |
|
| 465 | - 'only-events' => [[0, 1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => null], 'prop-filters' => []]],], |
|
| 466 | - 'start' => [[1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 467 | - 'end' => [[0], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC'))], 'prop-filters' => []]],], |
|
| 468 | - 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2036-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 469 | - ]; |
|
| 470 | - } |
|
| 471 | - |
|
| 472 | - public function testCalendarSynchronization(): void { |
|
| 473 | - |
|
| 474 | - // construct calendar for testing |
|
| 475 | - $calendarId = $this->createTestCalendar(); |
|
| 476 | - |
|
| 477 | - /** test fresh sync state with NO events in calendar */ |
|
| 478 | - // construct test state |
|
| 479 | - $stateTest = ['syncToken' => 1, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 480 | - // retrieve live state |
|
| 481 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 482 | - // test live state |
|
| 483 | - $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with NO events in calendar'); |
|
| 484 | - |
|
| 485 | - /** test delta sync state with NO events in calendar */ |
|
| 486 | - // construct test state |
|
| 487 | - $stateTest = ['syncToken' => 1, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 488 | - // retrieve live state |
|
| 489 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '2', 1); |
|
| 490 | - // test live state |
|
| 491 | - $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with NO events in calendar'); |
|
| 492 | - |
|
| 493 | - /** add events to calendar */ |
|
| 494 | - $event1 = $this->createEvent($calendarId, '20240701T130000Z', '20240701T140000Z'); |
|
| 495 | - $event2 = $this->createEvent($calendarId, '20240701T140000Z', '20240701T150000Z'); |
|
| 496 | - $event3 = $this->createEvent($calendarId, '20240701T150000Z', '20240701T160000Z'); |
|
| 497 | - |
|
| 498 | - /** test fresh sync state with events in calendar */ |
|
| 499 | - // construct expected state |
|
| 500 | - $stateTest = ['syncToken' => 4, 'added' => [$event1, $event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 501 | - sort($stateTest['added']); |
|
| 502 | - // retrieve live state |
|
| 503 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 504 | - // sort live state results |
|
| 505 | - sort($stateLive['added']); |
|
| 506 | - sort($stateLive['modified']); |
|
| 507 | - sort($stateLive['deleted']); |
|
| 508 | - // test live state |
|
| 509 | - $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with events in calendar'); |
|
| 510 | - |
|
| 511 | - /** test delta sync state with events in calendar */ |
|
| 512 | - // construct expected state |
|
| 513 | - $stateTest = ['syncToken' => 4, 'added' => [$event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 514 | - sort($stateTest['added']); |
|
| 515 | - // retrieve live state |
|
| 516 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '2', 1); |
|
| 517 | - // sort live state results |
|
| 518 | - sort($stateLive['added']); |
|
| 519 | - sort($stateLive['modified']); |
|
| 520 | - sort($stateLive['deleted']); |
|
| 521 | - // test live state |
|
| 522 | - $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with events in calendar'); |
|
| 523 | - |
|
| 524 | - /** modify/delete events in calendar */ |
|
| 525 | - $this->deleteEvent($calendarId, $event1); |
|
| 526 | - $this->modifyEvent($calendarId, $event2, '20250701T140000Z', '20250701T150000Z'); |
|
| 527 | - |
|
| 528 | - /** test fresh sync state with modified/deleted events in calendar */ |
|
| 529 | - // construct expected state |
|
| 530 | - $stateTest = ['syncToken' => 6, 'added' => [$event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 531 | - sort($stateTest['added']); |
|
| 532 | - // retrieve live state |
|
| 533 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 534 | - // sort live state results |
|
| 535 | - sort($stateLive['added']); |
|
| 536 | - sort($stateLive['modified']); |
|
| 537 | - sort($stateLive['deleted']); |
|
| 538 | - // test live state |
|
| 539 | - $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with modified/deleted events in calendar'); |
|
| 540 | - |
|
| 541 | - /** test delta sync state with modified/deleted events in calendar */ |
|
| 542 | - // construct expected state |
|
| 543 | - $stateTest = ['syncToken' => 6, 'added' => [$event3], 'modified' => [$event2], 'deleted' => [$event1]]; |
|
| 544 | - // retrieve live state |
|
| 545 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '3', 1); |
|
| 546 | - // test live state |
|
| 547 | - $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with modified/deleted events in calendar'); |
|
| 548 | - |
|
| 549 | - /** test delta sync state with modified/deleted events in calendar and invalid token */ |
|
| 550 | - // construct expected state |
|
| 551 | - $stateTest = ['syncToken' => 6, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 552 | - // retrieve live state |
|
| 553 | - $stateLive = $this->backend->getChangesForCalendar($calendarId, '6', 1); |
|
| 554 | - // test live state |
|
| 555 | - $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with modified/deleted events in calendar and invalid token'); |
|
| 556 | - |
|
| 557 | - } |
|
| 558 | - |
|
| 559 | - public function testPublications(): void { |
|
| 560 | - $this->dispatcher->expects(self::atLeastOnce()) |
|
| 561 | - ->method('dispatchTyped'); |
|
| 562 | - |
|
| 563 | - $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); |
|
| 564 | - |
|
| 565 | - $calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; |
|
| 566 | - |
|
| 567 | - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */ |
|
| 568 | - $l10n = $this->createMock(IL10N::class); |
|
| 569 | - $config = $this->createMock(IConfig::class); |
|
| 570 | - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 571 | - $calendar = new Calendar($this->backend, $calendarInfo, $l10n, $config, $logger); |
|
| 572 | - $calendar->setPublishStatus(true); |
|
| 573 | - $this->assertNotEquals(false, $calendar->getPublishStatus()); |
|
| 574 | - |
|
| 575 | - $publicCalendars = $this->backend->getPublicCalendars(); |
|
| 576 | - $this->assertCount(1, $publicCalendars); |
|
| 577 | - $this->assertEquals(true, $publicCalendars[0]['{http://owncloud.org/ns}public']); |
|
| 578 | - $this->assertEquals('User\'s displayname', $publicCalendars[0]['{http://nextcloud.com/ns}owner-displayname']); |
|
| 579 | - |
|
| 580 | - $publicCalendarURI = $publicCalendars[0]['uri']; |
|
| 581 | - $publicCalendar = $this->backend->getPublicCalendar($publicCalendarURI); |
|
| 582 | - $this->assertEquals(true, $publicCalendar['{http://owncloud.org/ns}public']); |
|
| 583 | - |
|
| 584 | - $calendar->setPublishStatus(false); |
|
| 585 | - $this->assertEquals(false, $calendar->getPublishStatus()); |
|
| 586 | - |
|
| 587 | - $this->expectException(NotFound::class); |
|
| 588 | - $this->backend->getPublicCalendar($publicCalendarURI); |
|
| 589 | - } |
|
| 590 | - |
|
| 591 | - public function testSubscriptions(): void { |
|
| 592 | - $id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', [ |
|
| 593 | - '{http://calendarserver.org/ns/}source' => new Href('test-source'), |
|
| 594 | - '{http://apple.com/ns/ical/}calendar-color' => '#1C4587', |
|
| 595 | - '{http://calendarserver.org/ns/}subscribed-strip-todos' => '' |
|
| 596 | - ]); |
|
| 597 | - |
|
| 598 | - $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 599 | - $this->assertCount(1, $subscriptions); |
|
| 600 | - $this->assertEquals('#1C4587', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']); |
|
| 601 | - $this->assertEquals(true, $subscriptions[0]['{http://calendarserver.org/ns/}subscribed-strip-todos']); |
|
| 602 | - $this->assertEquals($id, $subscriptions[0]['id']); |
|
| 603 | - |
|
| 604 | - $patch = new PropPatch([ |
|
| 605 | - '{DAV:}displayname' => 'Unit test', |
|
| 606 | - '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', |
|
| 607 | - ]); |
|
| 608 | - $this->backend->updateSubscription($id, $patch); |
|
| 609 | - $patch->commit(); |
|
| 610 | - |
|
| 611 | - $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 612 | - $this->assertCount(1, $subscriptions); |
|
| 613 | - $this->assertEquals($id, $subscriptions[0]['id']); |
|
| 614 | - $this->assertEquals('Unit test', $subscriptions[0]['{DAV:}displayname']); |
|
| 615 | - $this->assertEquals('#ac0606', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']); |
|
| 616 | - |
|
| 617 | - $this->backend->deleteSubscription($id); |
|
| 618 | - $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 619 | - $this->assertCount(0, $subscriptions); |
|
| 620 | - } |
|
| 621 | - |
|
| 622 | - public function providesSchedulingData() { |
|
| 623 | - $data = <<<EOS |
|
| 455 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 456 | + |
|
| 457 | + $co = $this->backend->getCalendarObjectByUID(self::UNIT_TEST_USER, '47d15e3ec8'); |
|
| 458 | + $this->assertNotNull($co); |
|
| 459 | + } |
|
| 460 | + |
|
| 461 | + public function providesCalendarQueryParameters() { |
|
| 462 | + return [ |
|
| 463 | + 'all' => [[0, 1, 2, 3], [], []], |
|
| 464 | + 'only-todos' => [[], ['name' => 'VTODO'], []], |
|
| 465 | + 'only-events' => [[0, 1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => null], 'prop-filters' => []]],], |
|
| 466 | + 'start' => [[1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 467 | + 'end' => [[0], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC'))], 'prop-filters' => []]],], |
|
| 468 | + 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2036-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 469 | + ]; |
|
| 470 | + } |
|
| 471 | + |
|
| 472 | + public function testCalendarSynchronization(): void { |
|
| 473 | + |
|
| 474 | + // construct calendar for testing |
|
| 475 | + $calendarId = $this->createTestCalendar(); |
|
| 476 | + |
|
| 477 | + /** test fresh sync state with NO events in calendar */ |
|
| 478 | + // construct test state |
|
| 479 | + $stateTest = ['syncToken' => 1, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 480 | + // retrieve live state |
|
| 481 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 482 | + // test live state |
|
| 483 | + $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with NO events in calendar'); |
|
| 484 | + |
|
| 485 | + /** test delta sync state with NO events in calendar */ |
|
| 486 | + // construct test state |
|
| 487 | + $stateTest = ['syncToken' => 1, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 488 | + // retrieve live state |
|
| 489 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '2', 1); |
|
| 490 | + // test live state |
|
| 491 | + $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with NO events in calendar'); |
|
| 492 | + |
|
| 493 | + /** add events to calendar */ |
|
| 494 | + $event1 = $this->createEvent($calendarId, '20240701T130000Z', '20240701T140000Z'); |
|
| 495 | + $event2 = $this->createEvent($calendarId, '20240701T140000Z', '20240701T150000Z'); |
|
| 496 | + $event3 = $this->createEvent($calendarId, '20240701T150000Z', '20240701T160000Z'); |
|
| 497 | + |
|
| 498 | + /** test fresh sync state with events in calendar */ |
|
| 499 | + // construct expected state |
|
| 500 | + $stateTest = ['syncToken' => 4, 'added' => [$event1, $event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 501 | + sort($stateTest['added']); |
|
| 502 | + // retrieve live state |
|
| 503 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 504 | + // sort live state results |
|
| 505 | + sort($stateLive['added']); |
|
| 506 | + sort($stateLive['modified']); |
|
| 507 | + sort($stateLive['deleted']); |
|
| 508 | + // test live state |
|
| 509 | + $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with events in calendar'); |
|
| 510 | + |
|
| 511 | + /** test delta sync state with events in calendar */ |
|
| 512 | + // construct expected state |
|
| 513 | + $stateTest = ['syncToken' => 4, 'added' => [$event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 514 | + sort($stateTest['added']); |
|
| 515 | + // retrieve live state |
|
| 516 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '2', 1); |
|
| 517 | + // sort live state results |
|
| 518 | + sort($stateLive['added']); |
|
| 519 | + sort($stateLive['modified']); |
|
| 520 | + sort($stateLive['deleted']); |
|
| 521 | + // test live state |
|
| 522 | + $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with events in calendar'); |
|
| 523 | + |
|
| 524 | + /** modify/delete events in calendar */ |
|
| 525 | + $this->deleteEvent($calendarId, $event1); |
|
| 526 | + $this->modifyEvent($calendarId, $event2, '20250701T140000Z', '20250701T150000Z'); |
|
| 527 | + |
|
| 528 | + /** test fresh sync state with modified/deleted events in calendar */ |
|
| 529 | + // construct expected state |
|
| 530 | + $stateTest = ['syncToken' => 6, 'added' => [$event2, $event3], 'modified' => [], 'deleted' => []]; |
|
| 531 | + sort($stateTest['added']); |
|
| 532 | + // retrieve live state |
|
| 533 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 534 | + // sort live state results |
|
| 535 | + sort($stateLive['added']); |
|
| 536 | + sort($stateLive['modified']); |
|
| 537 | + sort($stateLive['deleted']); |
|
| 538 | + // test live state |
|
| 539 | + $this->assertEquals($stateTest, $stateLive, 'Failed test fresh sync state with modified/deleted events in calendar'); |
|
| 540 | + |
|
| 541 | + /** test delta sync state with modified/deleted events in calendar */ |
|
| 542 | + // construct expected state |
|
| 543 | + $stateTest = ['syncToken' => 6, 'added' => [$event3], 'modified' => [$event2], 'deleted' => [$event1]]; |
|
| 544 | + // retrieve live state |
|
| 545 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '3', 1); |
|
| 546 | + // test live state |
|
| 547 | + $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with modified/deleted events in calendar'); |
|
| 548 | + |
|
| 549 | + /** test delta sync state with modified/deleted events in calendar and invalid token */ |
|
| 550 | + // construct expected state |
|
| 551 | + $stateTest = ['syncToken' => 6, 'added' => [], 'modified' => [], 'deleted' => []]; |
|
| 552 | + // retrieve live state |
|
| 553 | + $stateLive = $this->backend->getChangesForCalendar($calendarId, '6', 1); |
|
| 554 | + // test live state |
|
| 555 | + $this->assertEquals($stateTest, $stateLive, 'Failed test delta sync state with modified/deleted events in calendar and invalid token'); |
|
| 556 | + |
|
| 557 | + } |
|
| 558 | + |
|
| 559 | + public function testPublications(): void { |
|
| 560 | + $this->dispatcher->expects(self::atLeastOnce()) |
|
| 561 | + ->method('dispatchTyped'); |
|
| 562 | + |
|
| 563 | + $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); |
|
| 564 | + |
|
| 565 | + $calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; |
|
| 566 | + |
|
| 567 | + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */ |
|
| 568 | + $l10n = $this->createMock(IL10N::class); |
|
| 569 | + $config = $this->createMock(IConfig::class); |
|
| 570 | + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 571 | + $calendar = new Calendar($this->backend, $calendarInfo, $l10n, $config, $logger); |
|
| 572 | + $calendar->setPublishStatus(true); |
|
| 573 | + $this->assertNotEquals(false, $calendar->getPublishStatus()); |
|
| 574 | + |
|
| 575 | + $publicCalendars = $this->backend->getPublicCalendars(); |
|
| 576 | + $this->assertCount(1, $publicCalendars); |
|
| 577 | + $this->assertEquals(true, $publicCalendars[0]['{http://owncloud.org/ns}public']); |
|
| 578 | + $this->assertEquals('User\'s displayname', $publicCalendars[0]['{http://nextcloud.com/ns}owner-displayname']); |
|
| 579 | + |
|
| 580 | + $publicCalendarURI = $publicCalendars[0]['uri']; |
|
| 581 | + $publicCalendar = $this->backend->getPublicCalendar($publicCalendarURI); |
|
| 582 | + $this->assertEquals(true, $publicCalendar['{http://owncloud.org/ns}public']); |
|
| 583 | + |
|
| 584 | + $calendar->setPublishStatus(false); |
|
| 585 | + $this->assertEquals(false, $calendar->getPublishStatus()); |
|
| 586 | + |
|
| 587 | + $this->expectException(NotFound::class); |
|
| 588 | + $this->backend->getPublicCalendar($publicCalendarURI); |
|
| 589 | + } |
|
| 590 | + |
|
| 591 | + public function testSubscriptions(): void { |
|
| 592 | + $id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', [ |
|
| 593 | + '{http://calendarserver.org/ns/}source' => new Href('test-source'), |
|
| 594 | + '{http://apple.com/ns/ical/}calendar-color' => '#1C4587', |
|
| 595 | + '{http://calendarserver.org/ns/}subscribed-strip-todos' => '' |
|
| 596 | + ]); |
|
| 597 | + |
|
| 598 | + $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 599 | + $this->assertCount(1, $subscriptions); |
|
| 600 | + $this->assertEquals('#1C4587', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']); |
|
| 601 | + $this->assertEquals(true, $subscriptions[0]['{http://calendarserver.org/ns/}subscribed-strip-todos']); |
|
| 602 | + $this->assertEquals($id, $subscriptions[0]['id']); |
|
| 603 | + |
|
| 604 | + $patch = new PropPatch([ |
|
| 605 | + '{DAV:}displayname' => 'Unit test', |
|
| 606 | + '{http://apple.com/ns/ical/}calendar-color' => '#ac0606', |
|
| 607 | + ]); |
|
| 608 | + $this->backend->updateSubscription($id, $patch); |
|
| 609 | + $patch->commit(); |
|
| 610 | + |
|
| 611 | + $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 612 | + $this->assertCount(1, $subscriptions); |
|
| 613 | + $this->assertEquals($id, $subscriptions[0]['id']); |
|
| 614 | + $this->assertEquals('Unit test', $subscriptions[0]['{DAV:}displayname']); |
|
| 615 | + $this->assertEquals('#ac0606', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']); |
|
| 616 | + |
|
| 617 | + $this->backend->deleteSubscription($id); |
|
| 618 | + $subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER); |
|
| 619 | + $this->assertCount(0, $subscriptions); |
|
| 620 | + } |
|
| 621 | + |
|
| 622 | + public function providesSchedulingData() { |
|
| 623 | + $data = <<<EOS |
|
| 624 | 624 | BEGIN:VCALENDAR |
| 625 | 625 | VERSION:2.0 |
| 626 | 626 | PRODID:-//Sabre//Sabre VObject 3.5.0//EN |
@@ -685,74 +685,74 @@ discard block |
||
| 685 | 685 | END:VCALENDAR |
| 686 | 686 | EOS; |
| 687 | 687 | |
| 688 | - return [ |
|
| 689 | - 'no data' => [''], |
|
| 690 | - 'failing on postgres' => [$data] |
|
| 691 | - ]; |
|
| 692 | - } |
|
| 688 | + return [ |
|
| 689 | + 'no data' => [''], |
|
| 690 | + 'failing on postgres' => [$data] |
|
| 691 | + ]; |
|
| 692 | + } |
|
| 693 | 693 | |
| 694 | - /** |
|
| 695 | - * @dataProvider providesSchedulingData |
|
| 696 | - * @param $objectData |
|
| 697 | - */ |
|
| 698 | - public function testScheduling($objectData): void { |
|
| 699 | - $this->backend->createSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule', $objectData); |
|
| 694 | + /** |
|
| 695 | + * @dataProvider providesSchedulingData |
|
| 696 | + * @param $objectData |
|
| 697 | + */ |
|
| 698 | + public function testScheduling($objectData): void { |
|
| 699 | + $this->backend->createSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule', $objectData); |
|
| 700 | 700 | |
| 701 | - $sos = $this->backend->getSchedulingObjects(self::UNIT_TEST_USER); |
|
| 702 | - $this->assertCount(1, $sos); |
|
| 701 | + $sos = $this->backend->getSchedulingObjects(self::UNIT_TEST_USER); |
|
| 702 | + $this->assertCount(1, $sos); |
|
| 703 | 703 | |
| 704 | - $so = $this->backend->getSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule'); |
|
| 705 | - $this->assertNotNull($so); |
|
| 704 | + $so = $this->backend->getSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule'); |
|
| 705 | + $this->assertNotNull($so); |
|
| 706 | 706 | |
| 707 | - $this->backend->deleteSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule'); |
|
| 707 | + $this->backend->deleteSchedulingObject(self::UNIT_TEST_USER, 'Sample Schedule'); |
|
| 708 | 708 | |
| 709 | - $sos = $this->backend->getSchedulingObjects(self::UNIT_TEST_USER); |
|
| 710 | - $this->assertCount(0, $sos); |
|
| 711 | - } |
|
| 709 | + $sos = $this->backend->getSchedulingObjects(self::UNIT_TEST_USER); |
|
| 710 | + $this->assertCount(0, $sos); |
|
| 711 | + } |
|
| 712 | 712 | |
| 713 | - /** |
|
| 714 | - * @dataProvider providesCalDataForGetDenormalizedData |
|
| 715 | - */ |
|
| 716 | - public function testGetDenormalizedData($expected, $key, $calData): void { |
|
| 717 | - try { |
|
| 718 | - $actual = $this->backend->getDenormalizedData($calData); |
|
| 719 | - $this->assertEquals($expected, $actual[$key]); |
|
| 720 | - } catch (\Throwable $e) { |
|
| 721 | - if (($e->getMessage() === 'Epoch doesn\'t fit in a PHP integer') && (PHP_INT_SIZE < 8)) { |
|
| 722 | - $this->markTestSkipped('This fail on 32bits because of PHP limitations in DateTime'); |
|
| 723 | - } |
|
| 724 | - throw $e; |
|
| 725 | - } |
|
| 726 | - } |
|
| 713 | + /** |
|
| 714 | + * @dataProvider providesCalDataForGetDenormalizedData |
|
| 715 | + */ |
|
| 716 | + public function testGetDenormalizedData($expected, $key, $calData): void { |
|
| 717 | + try { |
|
| 718 | + $actual = $this->backend->getDenormalizedData($calData); |
|
| 719 | + $this->assertEquals($expected, $actual[$key]); |
|
| 720 | + } catch (\Throwable $e) { |
|
| 721 | + if (($e->getMessage() === 'Epoch doesn\'t fit in a PHP integer') && (PHP_INT_SIZE < 8)) { |
|
| 722 | + $this->markTestSkipped('This fail on 32bits because of PHP limitations in DateTime'); |
|
| 723 | + } |
|
| 724 | + throw $e; |
|
| 725 | + } |
|
| 726 | + } |
|
| 727 | 727 | |
| 728 | - public function providesCalDataForGetDenormalizedData(): array { |
|
| 729 | - return [ |
|
| 730 | - 'first occurrence before unix epoch starts' => [0, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nDTSTART;VALUE=DATE:16040222\r\nDTEND;VALUE=DATE:16040223\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 731 | - 'no first occurrence because yearly' => [null, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 728 | + public function providesCalDataForGetDenormalizedData(): array { |
|
| 729 | + return [ |
|
| 730 | + 'first occurrence before unix epoch starts' => [0, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nDTSTART;VALUE=DATE:16040222\r\nDTEND;VALUE=DATE:16040223\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 731 | + 'no first occurrence because yearly' => [null, 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nUID:413F269B-B51B-46B1-AFB6-40055C53A4DC\r\nDTSTAMP:20160309T095056Z\r\nRRULE:FREQ=YEARLY\r\nSUMMARY:SUMMARY\r\nTRANSP:TRANSPARENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 732 | 732 | |
| 733 | - 'last occurrence is max when only last VEVENT in group is weekly' => [(new DateTime(CalDavBackend::MAX_DATE))->getTimestamp(), 'lastOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200812T103000\r\nDTEND;TZID=America/Los_Angeles:20200812T110000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nRECURRENCE-ID;TZID=America/Los_Angeles:20200811T123000\r\nCREATED:20200626T181848Z\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Weekly 1:1\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200728T123000\r\nDTEND;TZID=America/Los_Angeles:20200728T130000\r\nEXDATE;TZID=America/Los_Angeles:20200818T123000\r\nRRULE:FREQ=WEEKLY;BYDAY=TU\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20200626T181848Z\r\nDESCRIPTION:Setting up recurring time on our calendars\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Weekly 1:1\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 733 | + 'last occurrence is max when only last VEVENT in group is weekly' => [(new DateTime(CalDavBackend::MAX_DATE))->getTimestamp(), 'lastOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200812T103000\r\nDTEND;TZID=America/Los_Angeles:20200812T110000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nRECURRENCE-ID;TZID=America/Los_Angeles:20200811T123000\r\nCREATED:20200626T181848Z\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Weekly 1:1\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200728T123000\r\nDTEND;TZID=America/Los_Angeles:20200728T130000\r\nEXDATE;TZID=America/Los_Angeles:20200818T123000\r\nRRULE:FREQ=WEEKLY;BYDAY=TU\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20200626T181848Z\r\nDESCRIPTION:Setting up recurring time on our calendars\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Weekly 1:1\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 734 | 734 | |
| 735 | - 'last occurrence before unix epoch starts' => [0, 'lastOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:19110324\r\nDTEND;VALUE=DATE:19110325\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20200626T181848Z\r\nDESCRIPTION:Very old event\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Some old event\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 735 | + 'last occurrence before unix epoch starts' => [0, 'lastOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:19110324\r\nDTEND;VALUE=DATE:19110325\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20200626T181848Z\r\nDESCRIPTION:Very old event\r\nLAST-MODIFIED:20200922T192707Z\r\nSUMMARY:Some old event\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 736 | 736 | |
| 737 | - 'first occurrence is found when not first VEVENT in group' => [(new DateTime('2020-09-01T110000', new DateTimeZone('America/Los_Angeles')))->getTimestamp(), 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20201013T110000\r\nDTEND;TZID=America/Los_Angeles:20201013T120000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nRECURRENCE-ID;TZID=America/Los_Angeles:20201013T110000\r\nCREATED:20160330T034726Z\r\nLAST-MODIFIED:20200925T042014Z\r\nSTATUS:CONFIRMED\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200901T110000\r\nDTEND;TZID=America/Los_Angeles:20200901T120000\r\nRRULE:FREQ=WEEKLY;BYDAY=TU\r\nEXDATE;TZID=America/Los_Angeles:20200922T110000\r\nEXDATE;TZID=America/Los_Angeles:20200915T110000\r\nEXDATE;TZID=America/Los_Angeles:20200908T110000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20160330T034726Z\r\nLAST-MODIFIED:20200915T162810Z\r\nSTATUS:CONFIRMED\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 737 | + 'first occurrence is found when not first VEVENT in group' => [(new DateTime('2020-09-01T110000', new DateTimeZone('America/Los_Angeles')))->getTimestamp(), 'firstOccurence', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.3.0//EN\r\nCALSCALE:GREGORIAN\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20201013T110000\r\nDTEND;TZID=America/Los_Angeles:20201013T120000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nRECURRENCE-ID;TZID=America/Los_Angeles:20201013T110000\r\nCREATED:20160330T034726Z\r\nLAST-MODIFIED:20200925T042014Z\r\nSTATUS:CONFIRMED\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nDTSTART;TZID=America/Los_Angeles:20200901T110000\r\nDTEND;TZID=America/Los_Angeles:20200901T120000\r\nRRULE:FREQ=WEEKLY;BYDAY=TU\r\nEXDATE;TZID=America/Los_Angeles:20200922T110000\r\nEXDATE;TZID=America/Los_Angeles:20200915T110000\r\nEXDATE;TZID=America/Los_Angeles:20200908T110000\r\nDTSTAMP:20200927T180638Z\r\nUID:[email protected]\r\nCREATED:20160330T034726Z\r\nLAST-MODIFIED:20200915T162810Z\r\nSTATUS:CONFIRMED\r\nTRANSP:OPAQUE\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"], |
|
| 738 | 738 | |
| 739 | - 'CLASS:PRIVATE' => [CalDavBackend::CLASSIFICATION_PRIVATE, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PRIVATE\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 739 | + 'CLASS:PRIVATE' => [CalDavBackend::CLASSIFICATION_PRIVATE, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PRIVATE\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 740 | 740 | |
| 741 | - 'CLASS:PUBLIC' => [CalDavBackend::CLASSIFICATION_PUBLIC, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PUBLIC\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 741 | + 'CLASS:PUBLIC' => [CalDavBackend::CLASSIFICATION_PUBLIC, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:PUBLIC\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 742 | 742 | |
| 743 | - 'CLASS:CONFIDENTIAL' => [CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:CONFIDENTIAL\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 743 | + 'CLASS:CONFIDENTIAL' => [CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:CONFIDENTIAL\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 744 | 744 | |
| 745 | - 'no class set -> public' => [CalDavBackend::CLASSIFICATION_PUBLIC, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nTRANSP:OPAQUE\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 745 | + 'no class set -> public' => [CalDavBackend::CLASSIFICATION_PUBLIC, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nTRANSP:OPAQUE\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 746 | 746 | |
| 747 | - 'unknown class -> private' => [CalDavBackend::CLASSIFICATION_PRIVATE, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:VERTRAULICH\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 748 | - ]; |
|
| 749 | - } |
|
| 747 | + 'unknown class -> private' => [CalDavBackend::CLASSIFICATION_PRIVATE, 'classification', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//dmfs.org//mimedir.icalendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nX-LIC-LOCATION:Europe/Berlin\r\nBEGIN:DAYLIGHT\r\nTZOFFSETFROM:+0100\r\nTZOFFSETTO:+0200\r\nTZNAME:CEST\r\nDTSTART:19700329T020000\r\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\r\nEND:DAYLIGHT\r\nBEGIN:STANDARD\r\nTZOFFSETFROM:+0200\r\nTZOFFSETTO:+0100\r\nTZNAME:CET\r\nDTSTART:19701025T030000\r\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nDTSTART;TZID=Europe/Berlin:20160419T130000\r\nSUMMARY:Test\r\nCLASS:VERTRAULICH\r\nTRANSP:OPAQUE\r\nSTATUS:CONFIRMED\r\nDTEND;TZID=Europe/Berlin:20160419T140000\r\nLAST-MODIFIED:20160419T074202Z\r\nDTSTAMP:20160419T074202Z\r\nCREATED:20160419T074202Z\r\nUID:2e468c48-7860-492e-bc52-92fa0daeeccf.1461051722310\r\nEND:VEVENT\r\nEND:VCALENDAR"], |
|
| 748 | + ]; |
|
| 749 | + } |
|
| 750 | 750 | |
| 751 | - public function testCalendarSearch(): void { |
|
| 752 | - $calendarId = $this->createTestCalendar(); |
|
| 751 | + public function testCalendarSearch(): void { |
|
| 752 | + $calendarId = $this->createTestCalendar(); |
|
| 753 | 753 | |
| 754 | - $uri = static::getUniqueID('calobj'); |
|
| 755 | - $calData = <<<EOD |
|
| 754 | + $uri = static::getUniqueID('calobj'); |
|
| 755 | + $calData = <<<EOD |
|
| 756 | 756 | BEGIN:VCALENDAR |
| 757 | 757 | VERSION:2.0 |
| 758 | 758 | PRODID:ownCloud Calendar |
@@ -769,24 +769,24 @@ discard block |
||
| 769 | 769 | END:VCALENDAR |
| 770 | 770 | EOD; |
| 771 | 771 | |
| 772 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 772 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 773 | 773 | |
| 774 | - $search1 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 775 | - 'comps' => [ |
|
| 776 | - 'VEVENT', |
|
| 777 | - 'VTODO' |
|
| 778 | - ], |
|
| 779 | - 'props' => [ |
|
| 780 | - 'SUMMARY', |
|
| 781 | - 'LOCATION' |
|
| 782 | - ], |
|
| 783 | - 'search-term' => 'Test', |
|
| 784 | - ]); |
|
| 785 | - $this->assertEquals(count($search1), 1); |
|
| 774 | + $search1 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 775 | + 'comps' => [ |
|
| 776 | + 'VEVENT', |
|
| 777 | + 'VTODO' |
|
| 778 | + ], |
|
| 779 | + 'props' => [ |
|
| 780 | + 'SUMMARY', |
|
| 781 | + 'LOCATION' |
|
| 782 | + ], |
|
| 783 | + 'search-term' => 'Test', |
|
| 784 | + ]); |
|
| 785 | + $this->assertEquals(count($search1), 1); |
|
| 786 | 786 | |
| 787 | 787 | |
| 788 | - // update the card |
|
| 789 | - $calData = <<<'EOD' |
|
| 788 | + // update the card |
|
| 789 | + $calData = <<<'EOD' |
|
| 790 | 790 | BEGIN:VCALENDAR |
| 791 | 791 | VERSION:2.0 |
| 792 | 792 | PRODID:ownCloud Calendar |
@@ -802,93 +802,93 @@ discard block |
||
| 802 | 802 | END:VEVENT |
| 803 | 803 | END:VCALENDAR |
| 804 | 804 | EOD; |
| 805 | - $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 806 | - |
|
| 807 | - $search2 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 808 | - 'comps' => [ |
|
| 809 | - 'VEVENT', |
|
| 810 | - 'VTODO' |
|
| 811 | - ], |
|
| 812 | - 'props' => [ |
|
| 813 | - 'SUMMARY', |
|
| 814 | - 'LOCATION' |
|
| 815 | - ], |
|
| 816 | - 'search-term' => 'Test', |
|
| 817 | - ]); |
|
| 818 | - $this->assertEquals(count($search2), 0); |
|
| 819 | - |
|
| 820 | - $search3 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 821 | - 'comps' => [ |
|
| 822 | - 'VEVENT', |
|
| 823 | - 'VTODO' |
|
| 824 | - ], |
|
| 825 | - 'props' => [ |
|
| 826 | - 'SUMMARY', |
|
| 827 | - 'LOCATION' |
|
| 828 | - ], |
|
| 829 | - 'params' => [ |
|
| 830 | - [ |
|
| 831 | - 'property' => 'ATTENDEE', |
|
| 832 | - 'parameter' => 'CN' |
|
| 833 | - ] |
|
| 834 | - ], |
|
| 835 | - 'search-term' => 'Test', |
|
| 836 | - ]); |
|
| 837 | - $this->assertEquals(count($search3), 1); |
|
| 838 | - |
|
| 839 | - // t matches both summary and attendee's CN, but we want unique results |
|
| 840 | - $search4 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 841 | - 'comps' => [ |
|
| 842 | - 'VEVENT', |
|
| 843 | - 'VTODO' |
|
| 844 | - ], |
|
| 845 | - 'props' => [ |
|
| 846 | - 'SUMMARY', |
|
| 847 | - 'LOCATION' |
|
| 848 | - ], |
|
| 849 | - 'params' => [ |
|
| 850 | - [ |
|
| 851 | - 'property' => 'ATTENDEE', |
|
| 852 | - 'parameter' => 'CN' |
|
| 853 | - ] |
|
| 854 | - ], |
|
| 855 | - 'search-term' => 't', |
|
| 856 | - ]); |
|
| 857 | - $this->assertEquals(count($search4), 1); |
|
| 858 | - |
|
| 859 | - $this->backend->deleteCalendarObject($calendarId, $uri); |
|
| 860 | - |
|
| 861 | - $search5 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 862 | - 'comps' => [ |
|
| 863 | - 'VEVENT', |
|
| 864 | - 'VTODO' |
|
| 865 | - ], |
|
| 866 | - 'props' => [ |
|
| 867 | - 'SUMMARY', |
|
| 868 | - 'LOCATION' |
|
| 869 | - ], |
|
| 870 | - 'params' => [ |
|
| 871 | - [ |
|
| 872 | - 'property' => 'ATTENDEE', |
|
| 873 | - 'parameter' => 'CN' |
|
| 874 | - ] |
|
| 875 | - ], |
|
| 876 | - 'search-term' => 't', |
|
| 877 | - ]); |
|
| 878 | - $this->assertEquals(count($search5), 0); |
|
| 879 | - } |
|
| 880 | - |
|
| 881 | - /** |
|
| 882 | - * @dataProvider searchDataProvider |
|
| 883 | - */ |
|
| 884 | - public function testSearch(bool $isShared, array $searchOptions, int $count): void { |
|
| 885 | - $calendarId = $this->createTestCalendar(); |
|
| 886 | - |
|
| 887 | - $uris = []; |
|
| 888 | - $calData = []; |
|
| 889 | - |
|
| 890 | - $uris[] = static::getUniqueID('calobj'); |
|
| 891 | - $calData[] = <<<EOD |
|
| 805 | + $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 806 | + |
|
| 807 | + $search2 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 808 | + 'comps' => [ |
|
| 809 | + 'VEVENT', |
|
| 810 | + 'VTODO' |
|
| 811 | + ], |
|
| 812 | + 'props' => [ |
|
| 813 | + 'SUMMARY', |
|
| 814 | + 'LOCATION' |
|
| 815 | + ], |
|
| 816 | + 'search-term' => 'Test', |
|
| 817 | + ]); |
|
| 818 | + $this->assertEquals(count($search2), 0); |
|
| 819 | + |
|
| 820 | + $search3 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 821 | + 'comps' => [ |
|
| 822 | + 'VEVENT', |
|
| 823 | + 'VTODO' |
|
| 824 | + ], |
|
| 825 | + 'props' => [ |
|
| 826 | + 'SUMMARY', |
|
| 827 | + 'LOCATION' |
|
| 828 | + ], |
|
| 829 | + 'params' => [ |
|
| 830 | + [ |
|
| 831 | + 'property' => 'ATTENDEE', |
|
| 832 | + 'parameter' => 'CN' |
|
| 833 | + ] |
|
| 834 | + ], |
|
| 835 | + 'search-term' => 'Test', |
|
| 836 | + ]); |
|
| 837 | + $this->assertEquals(count($search3), 1); |
|
| 838 | + |
|
| 839 | + // t matches both summary and attendee's CN, but we want unique results |
|
| 840 | + $search4 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 841 | + 'comps' => [ |
|
| 842 | + 'VEVENT', |
|
| 843 | + 'VTODO' |
|
| 844 | + ], |
|
| 845 | + 'props' => [ |
|
| 846 | + 'SUMMARY', |
|
| 847 | + 'LOCATION' |
|
| 848 | + ], |
|
| 849 | + 'params' => [ |
|
| 850 | + [ |
|
| 851 | + 'property' => 'ATTENDEE', |
|
| 852 | + 'parameter' => 'CN' |
|
| 853 | + ] |
|
| 854 | + ], |
|
| 855 | + 'search-term' => 't', |
|
| 856 | + ]); |
|
| 857 | + $this->assertEquals(count($search4), 1); |
|
| 858 | + |
|
| 859 | + $this->backend->deleteCalendarObject($calendarId, $uri); |
|
| 860 | + |
|
| 861 | + $search5 = $this->backend->calendarSearch(self::UNIT_TEST_USER, [ |
|
| 862 | + 'comps' => [ |
|
| 863 | + 'VEVENT', |
|
| 864 | + 'VTODO' |
|
| 865 | + ], |
|
| 866 | + 'props' => [ |
|
| 867 | + 'SUMMARY', |
|
| 868 | + 'LOCATION' |
|
| 869 | + ], |
|
| 870 | + 'params' => [ |
|
| 871 | + [ |
|
| 872 | + 'property' => 'ATTENDEE', |
|
| 873 | + 'parameter' => 'CN' |
|
| 874 | + ] |
|
| 875 | + ], |
|
| 876 | + 'search-term' => 't', |
|
| 877 | + ]); |
|
| 878 | + $this->assertEquals(count($search5), 0); |
|
| 879 | + } |
|
| 880 | + |
|
| 881 | + /** |
|
| 882 | + * @dataProvider searchDataProvider |
|
| 883 | + */ |
|
| 884 | + public function testSearch(bool $isShared, array $searchOptions, int $count): void { |
|
| 885 | + $calendarId = $this->createTestCalendar(); |
|
| 886 | + |
|
| 887 | + $uris = []; |
|
| 888 | + $calData = []; |
|
| 889 | + |
|
| 890 | + $uris[] = static::getUniqueID('calobj'); |
|
| 891 | + $calData[] = <<<EOD |
|
| 892 | 892 | BEGIN:VCALENDAR |
| 893 | 893 | VERSION:2.0 |
| 894 | 894 | PRODID:Nextcloud Calendar |
@@ -905,8 +905,8 @@ discard block |
||
| 905 | 905 | END:VCALENDAR |
| 906 | 906 | EOD; |
| 907 | 907 | |
| 908 | - $uris[] = static::getUniqueID('calobj'); |
|
| 909 | - $calData[] = <<<EOD |
|
| 908 | + $uris[] = static::getUniqueID('calobj'); |
|
| 909 | + $calData[] = <<<EOD |
|
| 910 | 910 | BEGIN:VCALENDAR |
| 911 | 911 | VERSION:2.0 |
| 912 | 912 | PRODID:Nextcloud Calendar |
@@ -924,8 +924,8 @@ discard block |
||
| 924 | 924 | END:VCALENDAR |
| 925 | 925 | EOD; |
| 926 | 926 | |
| 927 | - $uris[] = static::getUniqueID('calobj'); |
|
| 928 | - $calData[] = <<<EOD |
|
| 927 | + $uris[] = static::getUniqueID('calobj'); |
|
| 928 | + $calData[] = <<<EOD |
|
| 929 | 929 | BEGIN:VCALENDAR |
| 930 | 930 | VERSION:2.0 |
| 931 | 931 | PRODID:Nextcloud Calendar |
@@ -943,8 +943,8 @@ discard block |
||
| 943 | 943 | END:VCALENDAR |
| 944 | 944 | EOD; |
| 945 | 945 | |
| 946 | - $uris[] = static::getUniqueID('calobj'); |
|
| 947 | - $calData[] = <<<EOD |
|
| 946 | + $uris[] = static::getUniqueID('calobj'); |
|
| 947 | + $calData[] = <<<EOD |
|
| 948 | 948 | BEGIN:VCALENDAR |
| 949 | 949 | VERSION:2.0 |
| 950 | 950 | PRODID:Nextcloud Calendar |
@@ -962,38 +962,38 @@ discard block |
||
| 962 | 962 | END:VCALENDAR |
| 963 | 963 | EOD; |
| 964 | 964 | |
| 965 | - $uriCount = count($uris); |
|
| 966 | - for ($i = 0; $i < $uriCount; $i++) { |
|
| 967 | - $this->backend->createCalendarObject($calendarId, |
|
| 968 | - $uris[$i], $calData[$i]); |
|
| 969 | - } |
|
| 970 | - |
|
| 971 | - $calendarInfo = [ |
|
| 972 | - 'id' => $calendarId, |
|
| 973 | - 'principaluri' => 'user1', |
|
| 974 | - '{http://owncloud.org/ns}owner-principal' => $isShared ? 'user2' : 'user1', |
|
| 975 | - ]; |
|
| 976 | - |
|
| 977 | - $result = $this->backend->search($calendarInfo, 'Test', |
|
| 978 | - ['SUMMARY', 'LOCATION', 'ATTENDEE'], $searchOptions, null, null); |
|
| 979 | - |
|
| 980 | - $this->assertCount($count, $result); |
|
| 981 | - } |
|
| 982 | - |
|
| 983 | - public function searchDataProvider() { |
|
| 984 | - return [ |
|
| 985 | - [false, [], 4], |
|
| 986 | - [true, ['timerange' => ['start' => new DateTime('2013-09-12 13:00:00'), 'end' => new DateTime('2013-09-12 14:00:00')]], 2], |
|
| 987 | - [true, ['timerange' => ['start' => new DateTime('2013-09-12 15:00:00'), 'end' => new DateTime('2013-09-12 16:00:00')]], 0], |
|
| 988 | - ]; |
|
| 989 | - } |
|
| 990 | - |
|
| 991 | - public function testSameUriSameIdForDifferentCalendarTypes(): void { |
|
| 992 | - $calendarId = $this->createTestCalendar(); |
|
| 993 | - $subscriptionId = $this->createTestSubscription(); |
|
| 994 | - |
|
| 995 | - $uri = static::getUniqueID('calobj'); |
|
| 996 | - $calData = <<<EOD |
|
| 965 | + $uriCount = count($uris); |
|
| 966 | + for ($i = 0; $i < $uriCount; $i++) { |
|
| 967 | + $this->backend->createCalendarObject($calendarId, |
|
| 968 | + $uris[$i], $calData[$i]); |
|
| 969 | + } |
|
| 970 | + |
|
| 971 | + $calendarInfo = [ |
|
| 972 | + 'id' => $calendarId, |
|
| 973 | + 'principaluri' => 'user1', |
|
| 974 | + '{http://owncloud.org/ns}owner-principal' => $isShared ? 'user2' : 'user1', |
|
| 975 | + ]; |
|
| 976 | + |
|
| 977 | + $result = $this->backend->search($calendarInfo, 'Test', |
|
| 978 | + ['SUMMARY', 'LOCATION', 'ATTENDEE'], $searchOptions, null, null); |
|
| 979 | + |
|
| 980 | + $this->assertCount($count, $result); |
|
| 981 | + } |
|
| 982 | + |
|
| 983 | + public function searchDataProvider() { |
|
| 984 | + return [ |
|
| 985 | + [false, [], 4], |
|
| 986 | + [true, ['timerange' => ['start' => new DateTime('2013-09-12 13:00:00'), 'end' => new DateTime('2013-09-12 14:00:00')]], 2], |
|
| 987 | + [true, ['timerange' => ['start' => new DateTime('2013-09-12 15:00:00'), 'end' => new DateTime('2013-09-12 16:00:00')]], 0], |
|
| 988 | + ]; |
|
| 989 | + } |
|
| 990 | + |
|
| 991 | + public function testSameUriSameIdForDifferentCalendarTypes(): void { |
|
| 992 | + $calendarId = $this->createTestCalendar(); |
|
| 993 | + $subscriptionId = $this->createTestSubscription(); |
|
| 994 | + |
|
| 995 | + $uri = static::getUniqueID('calobj'); |
|
| 996 | + $calData = <<<EOD |
|
| 997 | 997 | BEGIN:VCALENDAR |
| 998 | 998 | VERSION:2.0 |
| 999 | 999 | PRODID:ownCloud Calendar |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | END:VCALENDAR |
| 1011 | 1011 | EOD; |
| 1012 | 1012 | |
| 1013 | - $calData2 = <<<EOD |
|
| 1013 | + $calData2 = <<<EOD |
|
| 1014 | 1014 | BEGIN:VCALENDAR |
| 1015 | 1015 | VERSION:2.0 |
| 1016 | 1016 | PRODID:ownCloud Calendar |
@@ -1027,17 +1027,17 @@ discard block |
||
| 1027 | 1027 | END:VCALENDAR |
| 1028 | 1028 | EOD; |
| 1029 | 1029 | |
| 1030 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1031 | - $this->backend->createCalendarObject($subscriptionId, $uri, $calData2, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION); |
|
| 1030 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1031 | + $this->backend->createCalendarObject($subscriptionId, $uri, $calData2, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION); |
|
| 1032 | 1032 | |
| 1033 | - $this->assertEquals($calData, $this->backend->getCalendarObject($calendarId, $uri, CalDavBackend::CALENDAR_TYPE_CALENDAR)['calendardata']); |
|
| 1034 | - $this->assertEquals($calData2, $this->backend->getCalendarObject($subscriptionId, $uri, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION)['calendardata']); |
|
| 1035 | - } |
|
| 1033 | + $this->assertEquals($calData, $this->backend->getCalendarObject($calendarId, $uri, CalDavBackend::CALENDAR_TYPE_CALENDAR)['calendardata']); |
|
| 1034 | + $this->assertEquals($calData2, $this->backend->getCalendarObject($subscriptionId, $uri, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION)['calendardata']); |
|
| 1035 | + } |
|
| 1036 | 1036 | |
| 1037 | - public function testPurgeAllCachedEventsForSubscription(): void { |
|
| 1038 | - $subscriptionId = $this->createTestSubscription(); |
|
| 1039 | - $uri = static::getUniqueID('calobj'); |
|
| 1040 | - $calData = <<<EOD |
|
| 1037 | + public function testPurgeAllCachedEventsForSubscription(): void { |
|
| 1038 | + $subscriptionId = $this->createTestSubscription(); |
|
| 1039 | + $uri = static::getUniqueID('calobj'); |
|
| 1040 | + $calData = <<<EOD |
|
| 1041 | 1041 | BEGIN:VCALENDAR |
| 1042 | 1042 | VERSION:2.0 |
| 1043 | 1043 | PRODID:ownCloud Calendar |
@@ -1054,30 +1054,30 @@ discard block |
||
| 1054 | 1054 | END:VCALENDAR |
| 1055 | 1055 | EOD; |
| 1056 | 1056 | |
| 1057 | - $this->backend->createCalendarObject($subscriptionId, $uri, $calData, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION); |
|
| 1058 | - $this->backend->purgeAllCachedEventsForSubscription($subscriptionId); |
|
| 1057 | + $this->backend->createCalendarObject($subscriptionId, $uri, $calData, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION); |
|
| 1058 | + $this->backend->purgeAllCachedEventsForSubscription($subscriptionId); |
|
| 1059 | 1059 | |
| 1060 | - $this->assertEquals(null, $this->backend->getCalendarObject($subscriptionId, $uri, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION)); |
|
| 1061 | - } |
|
| 1060 | + $this->assertEquals(null, $this->backend->getCalendarObject($subscriptionId, $uri, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION)); |
|
| 1061 | + } |
|
| 1062 | 1062 | |
| 1063 | - public function testCalendarMovement(): void { |
|
| 1064 | - $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); |
|
| 1063 | + public function testCalendarMovement(): void { |
|
| 1064 | + $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); |
|
| 1065 | 1065 | |
| 1066 | - $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)); |
|
| 1066 | + $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)); |
|
| 1067 | 1067 | |
| 1068 | - $calendarInfoUser = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; |
|
| 1068 | + $calendarInfoUser = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; |
|
| 1069 | 1069 | |
| 1070 | - $this->backend->moveCalendar('Example', self::UNIT_TEST_USER, self::UNIT_TEST_USER1); |
|
| 1071 | - $this->assertCount(0, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)); |
|
| 1072 | - $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1)); |
|
| 1070 | + $this->backend->moveCalendar('Example', self::UNIT_TEST_USER, self::UNIT_TEST_USER1); |
|
| 1071 | + $this->assertCount(0, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)); |
|
| 1072 | + $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1)); |
|
| 1073 | 1073 | |
| 1074 | - $calendarInfoUser1 = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1)[0]; |
|
| 1075 | - $this->assertEquals($calendarInfoUser['id'], $calendarInfoUser1['id']); |
|
| 1076 | - $this->assertEquals($calendarInfoUser['uri'], $calendarInfoUser1['uri']); |
|
| 1077 | - } |
|
| 1074 | + $calendarInfoUser1 = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1)[0]; |
|
| 1075 | + $this->assertEquals($calendarInfoUser['id'], $calendarInfoUser1['id']); |
|
| 1076 | + $this->assertEquals($calendarInfoUser['uri'], $calendarInfoUser1['uri']); |
|
| 1077 | + } |
|
| 1078 | 1078 | |
| 1079 | - public function testSearchPrincipal(): void { |
|
| 1080 | - $myPublic = <<<EOD |
|
| 1079 | + public function testSearchPrincipal(): void { |
|
| 1080 | + $myPublic = <<<EOD |
|
| 1081 | 1081 | BEGIN:VCALENDAR |
| 1082 | 1082 | VERSION:2.0 |
| 1083 | 1083 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | END:VEVENT |
| 1114 | 1114 | END:VCALENDAR |
| 1115 | 1115 | EOD; |
| 1116 | - $myPrivate = <<<EOD |
|
| 1116 | + $myPrivate = <<<EOD |
|
| 1117 | 1117 | BEGIN:VCALENDAR |
| 1118 | 1118 | VERSION:2.0 |
| 1119 | 1119 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | END:VEVENT |
| 1150 | 1150 | END:VCALENDAR |
| 1151 | 1151 | EOD; |
| 1152 | - $myConfidential = <<<EOD |
|
| 1152 | + $myConfidential = <<<EOD |
|
| 1153 | 1153 | BEGIN:VCALENDAR |
| 1154 | 1154 | VERSION:2.0 |
| 1155 | 1155 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1186,7 +1186,7 @@ discard block |
||
| 1186 | 1186 | END:VCALENDAR |
| 1187 | 1187 | EOD; |
| 1188 | 1188 | |
| 1189 | - $sharerPublic = <<<EOD |
|
| 1189 | + $sharerPublic = <<<EOD |
|
| 1190 | 1190 | BEGIN:VCALENDAR |
| 1191 | 1191 | VERSION:2.0 |
| 1192 | 1192 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | END:VEVENT |
| 1223 | 1223 | END:VCALENDAR |
| 1224 | 1224 | EOD; |
| 1225 | - $sharerPrivate = <<<EOD |
|
| 1225 | + $sharerPrivate = <<<EOD |
|
| 1226 | 1226 | BEGIN:VCALENDAR |
| 1227 | 1227 | VERSION:2.0 |
| 1228 | 1228 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1258,7 +1258,7 @@ discard block |
||
| 1258 | 1258 | END:VEVENT |
| 1259 | 1259 | END:VCALENDAR |
| 1260 | 1260 | EOD; |
| 1261 | - $sharerConfidential = <<<EOD |
|
| 1261 | + $sharerConfidential = <<<EOD |
|
| 1262 | 1262 | BEGIN:VCALENDAR |
| 1263 | 1263 | VERSION:2.0 |
| 1264 | 1264 | PRODID:-//dmfs.org//mimedir.icalendar//EN |
@@ -1295,81 +1295,81 @@ discard block |
||
| 1295 | 1295 | END:VCALENDAR |
| 1296 | 1296 | EOD; |
| 1297 | 1297 | |
| 1298 | - $l10n = $this->createMock(IL10N::class); |
|
| 1299 | - $l10n |
|
| 1300 | - ->expects($this->any()) |
|
| 1301 | - ->method('t') |
|
| 1302 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 1303 | - return vsprintf($text, $parameters); |
|
| 1304 | - }); |
|
| 1305 | - $config = $this->createMock(IConfig::class); |
|
| 1306 | - $this->userManager->expects($this->any()) |
|
| 1307 | - ->method('userExists') |
|
| 1308 | - ->willReturn(true); |
|
| 1309 | - $this->groupManager->expects($this->any()) |
|
| 1310 | - ->method('groupExists') |
|
| 1311 | - ->willReturn(true); |
|
| 1312 | - $this->principal->expects(self::atLeastOnce()) |
|
| 1313 | - ->method('findByUri') |
|
| 1314 | - ->willReturn(self::UNIT_TEST_USER); |
|
| 1315 | - |
|
| 1316 | - $me = self::UNIT_TEST_USER; |
|
| 1317 | - $sharer = self::UNIT_TEST_USER1; |
|
| 1318 | - $this->backend->createCalendar($me, 'calendar-uri-me', []); |
|
| 1319 | - $this->backend->createCalendar($sharer, 'calendar-uri-sharer', []); |
|
| 1320 | - |
|
| 1321 | - $myCalendars = $this->backend->getCalendarsForUser($me); |
|
| 1322 | - $this->assertCount(1, $myCalendars); |
|
| 1323 | - |
|
| 1324 | - $sharerCalendars = $this->backend->getCalendarsForUser($sharer); |
|
| 1325 | - $this->assertCount(1, $sharerCalendars); |
|
| 1326 | - |
|
| 1327 | - $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 1328 | - $sharerCalendar = new Calendar($this->backend, $sharerCalendars[0], $l10n, $config, $logger); |
|
| 1329 | - $this->backend->updateShares($sharerCalendar, [ |
|
| 1330 | - [ |
|
| 1331 | - 'href' => 'principal:' . $me, |
|
| 1332 | - 'readOnly' => false, |
|
| 1333 | - ], |
|
| 1334 | - ], []); |
|
| 1335 | - |
|
| 1336 | - $this->assertCount(2, $this->backend->getCalendarsForUser($me)); |
|
| 1337 | - |
|
| 1338 | - $this->backend->createCalendarObject($myCalendars[0]['id'], 'event0.ics', $myPublic); |
|
| 1339 | - $this->backend->createCalendarObject($myCalendars[0]['id'], 'event1.ics', $myPrivate); |
|
| 1340 | - $this->backend->createCalendarObject($myCalendars[0]['id'], 'event2.ics', $myConfidential); |
|
| 1341 | - |
|
| 1342 | - $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event3.ics', $sharerPublic); |
|
| 1343 | - $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event4.ics', $sharerPrivate); |
|
| 1344 | - $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event5.ics', $sharerConfidential); |
|
| 1345 | - |
|
| 1346 | - $mySearchResults = $this->backend->searchPrincipalUri($me, 'Test', ['VEVENT'], ['SUMMARY'], []); |
|
| 1347 | - $sharerSearchResults = $this->backend->searchPrincipalUri($sharer, 'Test', ['VEVENT'], ['SUMMARY'], []); |
|
| 1348 | - |
|
| 1349 | - $this->assertCount(4, $mySearchResults); |
|
| 1350 | - $this->assertCount(3, $sharerSearchResults); |
|
| 1351 | - |
|
| 1352 | - $this->assertEquals($myPublic, $mySearchResults[0]['calendardata']); |
|
| 1353 | - $this->assertEquals($myPrivate, $mySearchResults[1]['calendardata']); |
|
| 1354 | - $this->assertEquals($myConfidential, $mySearchResults[2]['calendardata']); |
|
| 1355 | - $this->assertEquals($sharerPublic, $mySearchResults[3]['calendardata']); |
|
| 1356 | - |
|
| 1357 | - $this->assertEquals($sharerPublic, $sharerSearchResults[0]['calendardata']); |
|
| 1358 | - $this->assertEquals($sharerPrivate, $sharerSearchResults[1]['calendardata']); |
|
| 1359 | - $this->assertEquals($sharerConfidential, $sharerSearchResults[2]['calendardata']); |
|
| 1360 | - } |
|
| 1361 | - |
|
| 1362 | - /** |
|
| 1363 | - * @throws \OCP\DB\Exception |
|
| 1364 | - * @throws \Sabre\DAV\Exception\BadRequest |
|
| 1365 | - */ |
|
| 1366 | - public function testPruneOutdatedSyncTokens(): void { |
|
| 1367 | - $calendarId = $this->createTestCalendar(); |
|
| 1368 | - $changes = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 1369 | - $syncToken = $changes['syncToken']; |
|
| 1370 | - |
|
| 1371 | - $uri = static::getUniqueID('calobj'); |
|
| 1372 | - $calData = <<<EOD |
|
| 1298 | + $l10n = $this->createMock(IL10N::class); |
|
| 1299 | + $l10n |
|
| 1300 | + ->expects($this->any()) |
|
| 1301 | + ->method('t') |
|
| 1302 | + ->willReturnCallback(function ($text, $parameters = []) { |
|
| 1303 | + return vsprintf($text, $parameters); |
|
| 1304 | + }); |
|
| 1305 | + $config = $this->createMock(IConfig::class); |
|
| 1306 | + $this->userManager->expects($this->any()) |
|
| 1307 | + ->method('userExists') |
|
| 1308 | + ->willReturn(true); |
|
| 1309 | + $this->groupManager->expects($this->any()) |
|
| 1310 | + ->method('groupExists') |
|
| 1311 | + ->willReturn(true); |
|
| 1312 | + $this->principal->expects(self::atLeastOnce()) |
|
| 1313 | + ->method('findByUri') |
|
| 1314 | + ->willReturn(self::UNIT_TEST_USER); |
|
| 1315 | + |
|
| 1316 | + $me = self::UNIT_TEST_USER; |
|
| 1317 | + $sharer = self::UNIT_TEST_USER1; |
|
| 1318 | + $this->backend->createCalendar($me, 'calendar-uri-me', []); |
|
| 1319 | + $this->backend->createCalendar($sharer, 'calendar-uri-sharer', []); |
|
| 1320 | + |
|
| 1321 | + $myCalendars = $this->backend->getCalendarsForUser($me); |
|
| 1322 | + $this->assertCount(1, $myCalendars); |
|
| 1323 | + |
|
| 1324 | + $sharerCalendars = $this->backend->getCalendarsForUser($sharer); |
|
| 1325 | + $this->assertCount(1, $sharerCalendars); |
|
| 1326 | + |
|
| 1327 | + $logger = $this->createMock(\Psr\Log\LoggerInterface::class); |
|
| 1328 | + $sharerCalendar = new Calendar($this->backend, $sharerCalendars[0], $l10n, $config, $logger); |
|
| 1329 | + $this->backend->updateShares($sharerCalendar, [ |
|
| 1330 | + [ |
|
| 1331 | + 'href' => 'principal:' . $me, |
|
| 1332 | + 'readOnly' => false, |
|
| 1333 | + ], |
|
| 1334 | + ], []); |
|
| 1335 | + |
|
| 1336 | + $this->assertCount(2, $this->backend->getCalendarsForUser($me)); |
|
| 1337 | + |
|
| 1338 | + $this->backend->createCalendarObject($myCalendars[0]['id'], 'event0.ics', $myPublic); |
|
| 1339 | + $this->backend->createCalendarObject($myCalendars[0]['id'], 'event1.ics', $myPrivate); |
|
| 1340 | + $this->backend->createCalendarObject($myCalendars[0]['id'], 'event2.ics', $myConfidential); |
|
| 1341 | + |
|
| 1342 | + $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event3.ics', $sharerPublic); |
|
| 1343 | + $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event4.ics', $sharerPrivate); |
|
| 1344 | + $this->backend->createCalendarObject($sharerCalendars[0]['id'], 'event5.ics', $sharerConfidential); |
|
| 1345 | + |
|
| 1346 | + $mySearchResults = $this->backend->searchPrincipalUri($me, 'Test', ['VEVENT'], ['SUMMARY'], []); |
|
| 1347 | + $sharerSearchResults = $this->backend->searchPrincipalUri($sharer, 'Test', ['VEVENT'], ['SUMMARY'], []); |
|
| 1348 | + |
|
| 1349 | + $this->assertCount(4, $mySearchResults); |
|
| 1350 | + $this->assertCount(3, $sharerSearchResults); |
|
| 1351 | + |
|
| 1352 | + $this->assertEquals($myPublic, $mySearchResults[0]['calendardata']); |
|
| 1353 | + $this->assertEquals($myPrivate, $mySearchResults[1]['calendardata']); |
|
| 1354 | + $this->assertEquals($myConfidential, $mySearchResults[2]['calendardata']); |
|
| 1355 | + $this->assertEquals($sharerPublic, $mySearchResults[3]['calendardata']); |
|
| 1356 | + |
|
| 1357 | + $this->assertEquals($sharerPublic, $sharerSearchResults[0]['calendardata']); |
|
| 1358 | + $this->assertEquals($sharerPrivate, $sharerSearchResults[1]['calendardata']); |
|
| 1359 | + $this->assertEquals($sharerConfidential, $sharerSearchResults[2]['calendardata']); |
|
| 1360 | + } |
|
| 1361 | + |
|
| 1362 | + /** |
|
| 1363 | + * @throws \OCP\DB\Exception |
|
| 1364 | + * @throws \Sabre\DAV\Exception\BadRequest |
|
| 1365 | + */ |
|
| 1366 | + public function testPruneOutdatedSyncTokens(): void { |
|
| 1367 | + $calendarId = $this->createTestCalendar(); |
|
| 1368 | + $changes = $this->backend->getChangesForCalendar($calendarId, '', 1); |
|
| 1369 | + $syncToken = $changes['syncToken']; |
|
| 1370 | + |
|
| 1371 | + $uri = static::getUniqueID('calobj'); |
|
| 1372 | + $calData = <<<EOD |
|
| 1373 | 1373 | BEGIN:VCALENDAR |
| 1374 | 1374 | VERSION:2.0 |
| 1375 | 1375 | PRODID:Nextcloud Calendar |
@@ -1386,10 +1386,10 @@ discard block |
||
| 1386 | 1386 | END:VCALENDAR |
| 1387 | 1387 | EOD; |
| 1388 | 1388 | |
| 1389 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1389 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1390 | 1390 | |
| 1391 | - // update the card |
|
| 1392 | - $calData = <<<'EOD' |
|
| 1391 | + // update the card |
|
| 1392 | + $calData = <<<'EOD' |
|
| 1393 | 1393 | BEGIN:VCALENDAR |
| 1394 | 1394 | VERSION:2.0 |
| 1395 | 1395 | PRODID:Nextcloud Calendar |
@@ -1405,29 +1405,29 @@ discard block |
||
| 1405 | 1405 | END:VEVENT |
| 1406 | 1406 | END:VCALENDAR |
| 1407 | 1407 | EOD; |
| 1408 | - $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 1408 | + $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 1409 | 1409 | |
| 1410 | - // Keep everything |
|
| 1411 | - $deleted = $this->backend->pruneOutdatedSyncTokens(0, 0); |
|
| 1412 | - self::assertSame(0, $deleted); |
|
| 1410 | + // Keep everything |
|
| 1411 | + $deleted = $this->backend->pruneOutdatedSyncTokens(0, 0); |
|
| 1412 | + self::assertSame(0, $deleted); |
|
| 1413 | 1413 | |
| 1414 | - $deleted = $this->backend->pruneOutdatedSyncTokens(0, time()); |
|
| 1415 | - // At least one from the object creation and one from the object update |
|
| 1416 | - $this->assertGreaterThanOrEqual(2, $deleted); |
|
| 1417 | - $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 1); |
|
| 1418 | - $this->assertEmpty($changes['added']); |
|
| 1419 | - $this->assertEmpty($changes['modified']); |
|
| 1420 | - $this->assertEmpty($changes['deleted']); |
|
| 1414 | + $deleted = $this->backend->pruneOutdatedSyncTokens(0, time()); |
|
| 1415 | + // At least one from the object creation and one from the object update |
|
| 1416 | + $this->assertGreaterThanOrEqual(2, $deleted); |
|
| 1417 | + $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 1); |
|
| 1418 | + $this->assertEmpty($changes['added']); |
|
| 1419 | + $this->assertEmpty($changes['modified']); |
|
| 1420 | + $this->assertEmpty($changes['deleted']); |
|
| 1421 | 1421 | |
| 1422 | - // Test that objects remain |
|
| 1422 | + // Test that objects remain |
|
| 1423 | 1423 | |
| 1424 | - // Currently changes are empty |
|
| 1425 | - $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1426 | - $this->assertEquals(0, count($changes['added'] + $changes['modified'] + $changes['deleted'])); |
|
| 1424 | + // Currently changes are empty |
|
| 1425 | + $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1426 | + $this->assertEquals(0, count($changes['added'] + $changes['modified'] + $changes['deleted'])); |
|
| 1427 | 1427 | |
| 1428 | - // Create card |
|
| 1429 | - $uri = static::getUniqueID('calobj'); |
|
| 1430 | - $calData = <<<EOD |
|
| 1428 | + // Create card |
|
| 1429 | + $uri = static::getUniqueID('calobj'); |
|
| 1430 | + $calData = <<<EOD |
|
| 1431 | 1431 | BEGIN:VCALENDAR |
| 1432 | 1432 | VERSION:2.0 |
| 1433 | 1433 | PRODID:Nextcloud Calendar |
@@ -1443,16 +1443,16 @@ discard block |
||
| 1443 | 1443 | END:VEVENT |
| 1444 | 1444 | END:VCALENDAR |
| 1445 | 1445 | EOD; |
| 1446 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1446 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1447 | 1447 | |
| 1448 | - // We now have one add |
|
| 1449 | - $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1450 | - $this->assertEquals(1, count($changes['added'])); |
|
| 1451 | - $this->assertEmpty($changes['modified']); |
|
| 1452 | - $this->assertEmpty($changes['deleted']); |
|
| 1448 | + // We now have one add |
|
| 1449 | + $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1450 | + $this->assertEquals(1, count($changes['added'])); |
|
| 1451 | + $this->assertEmpty($changes['modified']); |
|
| 1452 | + $this->assertEmpty($changes['deleted']); |
|
| 1453 | 1453 | |
| 1454 | - // update the card |
|
| 1455 | - $calData = <<<'EOD' |
|
| 1454 | + // update the card |
|
| 1455 | + $calData = <<<'EOD' |
|
| 1456 | 1456 | BEGIN:VCALENDAR |
| 1457 | 1457 | VERSION:2.0 |
| 1458 | 1458 | PRODID:Nextcloud Calendar |
@@ -1468,38 +1468,38 @@ discard block |
||
| 1468 | 1468 | END:VEVENT |
| 1469 | 1469 | END:VCALENDAR |
| 1470 | 1470 | EOD; |
| 1471 | - $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 1472 | - |
|
| 1473 | - // One add, one modify, but shortened to modify |
|
| 1474 | - $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1475 | - $this->assertEmpty($changes['added']); |
|
| 1476 | - $this->assertEquals(1, count($changes['modified'])); |
|
| 1477 | - $this->assertEmpty($changes['deleted']); |
|
| 1478 | - |
|
| 1479 | - // Delete all but last change |
|
| 1480 | - $deleted = $this->backend->pruneOutdatedSyncTokens(1, time()); |
|
| 1481 | - $this->assertEquals(1, $deleted); // We had two changes before, now one |
|
| 1482 | - |
|
| 1483 | - // Only update should remain |
|
| 1484 | - $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1485 | - $this->assertEmpty($changes['added']); |
|
| 1486 | - $this->assertEquals(1, count($changes['modified'])); |
|
| 1487 | - $this->assertEmpty($changes['deleted']); |
|
| 1488 | - |
|
| 1489 | - // Check that no crash occurs when prune is called without current changes |
|
| 1490 | - $deleted = $this->backend->pruneOutdatedSyncTokens(1, time()); |
|
| 1491 | - self::assertSame(0, $deleted); |
|
| 1492 | - } |
|
| 1493 | - |
|
| 1494 | - public function testSearchAndExpandRecurrences(): void { |
|
| 1495 | - $calendarId = $this->createTestCalendar(); |
|
| 1496 | - $calendarInfo = [ |
|
| 1497 | - 'id' => $calendarId, |
|
| 1498 | - 'principaluri' => 'user1', |
|
| 1499 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1500 | - ]; |
|
| 1501 | - |
|
| 1502 | - $calData = <<<'EOD' |
|
| 1471 | + $this->backend->updateCalendarObject($calendarId, $uri, $calData); |
|
| 1472 | + |
|
| 1473 | + // One add, one modify, but shortened to modify |
|
| 1474 | + $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1475 | + $this->assertEmpty($changes['added']); |
|
| 1476 | + $this->assertEquals(1, count($changes['modified'])); |
|
| 1477 | + $this->assertEmpty($changes['deleted']); |
|
| 1478 | + |
|
| 1479 | + // Delete all but last change |
|
| 1480 | + $deleted = $this->backend->pruneOutdatedSyncTokens(1, time()); |
|
| 1481 | + $this->assertEquals(1, $deleted); // We had two changes before, now one |
|
| 1482 | + |
|
| 1483 | + // Only update should remain |
|
| 1484 | + $changes = $this->backend->getChangesForCalendar($calendarId, $syncToken, 100); |
|
| 1485 | + $this->assertEmpty($changes['added']); |
|
| 1486 | + $this->assertEquals(1, count($changes['modified'])); |
|
| 1487 | + $this->assertEmpty($changes['deleted']); |
|
| 1488 | + |
|
| 1489 | + // Check that no crash occurs when prune is called without current changes |
|
| 1490 | + $deleted = $this->backend->pruneOutdatedSyncTokens(1, time()); |
|
| 1491 | + self::assertSame(0, $deleted); |
|
| 1492 | + } |
|
| 1493 | + |
|
| 1494 | + public function testSearchAndExpandRecurrences(): void { |
|
| 1495 | + $calendarId = $this->createTestCalendar(); |
|
| 1496 | + $calendarInfo = [ |
|
| 1497 | + 'id' => $calendarId, |
|
| 1498 | + 'principaluri' => 'user1', |
|
| 1499 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1500 | + ]; |
|
| 1501 | + |
|
| 1502 | + $calData = <<<'EOD' |
|
| 1503 | 1503 | BEGIN:VCALENDAR |
| 1504 | 1504 | PRODID:-//IDN nextcloud.com//Calendar app 4.5.0-alpha.2//EN |
| 1505 | 1505 | CALSCALE:GREGORIAN |
@@ -1518,50 +1518,50 @@ discard block |
||
| 1518 | 1518 | END:VEVENT |
| 1519 | 1519 | END:VCALENDAR |
| 1520 | 1520 | EOD; |
| 1521 | - $uri = static::getUniqueID('calobj'); |
|
| 1522 | - $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1523 | - |
|
| 1524 | - $start = new DateTimeImmutable('2023-09-20T00:00:00Z'); |
|
| 1525 | - $end = $start->add(new DateInterval('P14D')); |
|
| 1526 | - |
|
| 1527 | - $results = $this->backend->search( |
|
| 1528 | - $calendarInfo, |
|
| 1529 | - '', |
|
| 1530 | - [], |
|
| 1531 | - [ |
|
| 1532 | - 'timerange' => [ |
|
| 1533 | - 'start' => $start, |
|
| 1534 | - 'end' => $end, |
|
| 1535 | - ] |
|
| 1536 | - ], |
|
| 1537 | - null, |
|
| 1538 | - null, |
|
| 1539 | - ); |
|
| 1540 | - |
|
| 1541 | - $this->assertCount(1, $results); |
|
| 1542 | - $this->assertCount(14, $results[0]['objects']); |
|
| 1543 | - foreach ($results as $result) { |
|
| 1544 | - foreach ($result['objects'] as $object) { |
|
| 1545 | - $this->assertEquals($object['UID'][0], '7b7d5d12-683c-48ce-973a-b3e1cb0bae2a'); |
|
| 1546 | - $this->assertEquals($object['SUMMARY'][0], 'Daily Event'); |
|
| 1547 | - $this->assertGreaterThanOrEqual( |
|
| 1548 | - $start->getTimestamp(), |
|
| 1549 | - $object['DTSTART'][0]->getTimestamp(), |
|
| 1550 | - 'Recurrence starting before requested start', |
|
| 1551 | - ); |
|
| 1552 | - $this->assertLessThanOrEqual( |
|
| 1553 | - $end->getTimestamp(), |
|
| 1554 | - $object['DTSTART'][0]->getTimestamp(), |
|
| 1555 | - 'Recurrence starting after requested end', |
|
| 1556 | - ); |
|
| 1557 | - } |
|
| 1558 | - } |
|
| 1559 | - } |
|
| 1560 | - |
|
| 1561 | - public function testRestoreChanges(): void { |
|
| 1562 | - $calendarId = $this->createTestCalendar(); |
|
| 1563 | - $uri1 = static::getUniqueID('calobj1') . '.ics'; |
|
| 1564 | - $calData = <<<EOD |
|
| 1521 | + $uri = static::getUniqueID('calobj'); |
|
| 1522 | + $this->backend->createCalendarObject($calendarId, $uri, $calData); |
|
| 1523 | + |
|
| 1524 | + $start = new DateTimeImmutable('2023-09-20T00:00:00Z'); |
|
| 1525 | + $end = $start->add(new DateInterval('P14D')); |
|
| 1526 | + |
|
| 1527 | + $results = $this->backend->search( |
|
| 1528 | + $calendarInfo, |
|
| 1529 | + '', |
|
| 1530 | + [], |
|
| 1531 | + [ |
|
| 1532 | + 'timerange' => [ |
|
| 1533 | + 'start' => $start, |
|
| 1534 | + 'end' => $end, |
|
| 1535 | + ] |
|
| 1536 | + ], |
|
| 1537 | + null, |
|
| 1538 | + null, |
|
| 1539 | + ); |
|
| 1540 | + |
|
| 1541 | + $this->assertCount(1, $results); |
|
| 1542 | + $this->assertCount(14, $results[0]['objects']); |
|
| 1543 | + foreach ($results as $result) { |
|
| 1544 | + foreach ($result['objects'] as $object) { |
|
| 1545 | + $this->assertEquals($object['UID'][0], '7b7d5d12-683c-48ce-973a-b3e1cb0bae2a'); |
|
| 1546 | + $this->assertEquals($object['SUMMARY'][0], 'Daily Event'); |
|
| 1547 | + $this->assertGreaterThanOrEqual( |
|
| 1548 | + $start->getTimestamp(), |
|
| 1549 | + $object['DTSTART'][0]->getTimestamp(), |
|
| 1550 | + 'Recurrence starting before requested start', |
|
| 1551 | + ); |
|
| 1552 | + $this->assertLessThanOrEqual( |
|
| 1553 | + $end->getTimestamp(), |
|
| 1554 | + $object['DTSTART'][0]->getTimestamp(), |
|
| 1555 | + 'Recurrence starting after requested end', |
|
| 1556 | + ); |
|
| 1557 | + } |
|
| 1558 | + } |
|
| 1559 | + } |
|
| 1560 | + |
|
| 1561 | + public function testRestoreChanges(): void { |
|
| 1562 | + $calendarId = $this->createTestCalendar(); |
|
| 1563 | + $uri1 = static::getUniqueID('calobj1') . '.ics'; |
|
| 1564 | + $calData = <<<EOD |
|
| 1565 | 1565 | BEGIN:VCALENDAR |
| 1566 | 1566 | VERSION:2.0 |
| 1567 | 1567 | PRODID:Nextcloud Calendar |
@@ -1577,8 +1577,8 @@ discard block |
||
| 1577 | 1577 | END:VEVENT |
| 1578 | 1578 | END:VCALENDAR |
| 1579 | 1579 | EOD; |
| 1580 | - $this->backend->createCalendarObject($calendarId, $uri1, $calData); |
|
| 1581 | - $calData = <<<EOD |
|
| 1580 | + $this->backend->createCalendarObject($calendarId, $uri1, $calData); |
|
| 1581 | + $calData = <<<EOD |
|
| 1582 | 1582 | BEGIN:VCALENDAR |
| 1583 | 1583 | VERSION:2.0 |
| 1584 | 1584 | PRODID:Nextcloud Calendar |
@@ -1595,9 +1595,9 @@ discard block |
||
| 1595 | 1595 | END:VEVENT |
| 1596 | 1596 | END:VCALENDAR |
| 1597 | 1597 | EOD; |
| 1598 | - $this->backend->updateCalendarObject($calendarId, $uri1, $calData); |
|
| 1599 | - $uri2 = static::getUniqueID('calobj2') . '.ics'; |
|
| 1600 | - $calData = <<<EOD |
|
| 1598 | + $this->backend->updateCalendarObject($calendarId, $uri1, $calData); |
|
| 1599 | + $uri2 = static::getUniqueID('calobj2') . '.ics'; |
|
| 1600 | + $calData = <<<EOD |
|
| 1601 | 1601 | BEGIN:VCALENDAR |
| 1602 | 1602 | VERSION:2.0 |
| 1603 | 1603 | PRODID:Nextcloud Calendar |
@@ -1613,11 +1613,11 @@ discard block |
||
| 1613 | 1613 | END:VEVENT |
| 1614 | 1614 | END:VCALENDAR |
| 1615 | 1615 | EOD; |
| 1616 | - $this->backend->createCalendarObject($calendarId, $uri2, $calData); |
|
| 1617 | - $changesBefore = $this->backend->getChangesForCalendar($calendarId, null, 1); |
|
| 1618 | - $this->backend->deleteCalendarObject($calendarId, $uri2); |
|
| 1619 | - $uri3 = static::getUniqueID('calobj3') . '.ics'; |
|
| 1620 | - $calData = <<<EOD |
|
| 1616 | + $this->backend->createCalendarObject($calendarId, $uri2, $calData); |
|
| 1617 | + $changesBefore = $this->backend->getChangesForCalendar($calendarId, null, 1); |
|
| 1618 | + $this->backend->deleteCalendarObject($calendarId, $uri2); |
|
| 1619 | + $uri3 = static::getUniqueID('calobj3') . '.ics'; |
|
| 1620 | + $calData = <<<EOD |
|
| 1621 | 1621 | BEGIN:VCALENDAR |
| 1622 | 1622 | VERSION:2.0 |
| 1623 | 1623 | PRODID:Nextcloud Calendar |
@@ -1633,261 +1633,261 @@ discard block |
||
| 1633 | 1633 | END:VEVENT |
| 1634 | 1634 | END:VCALENDAR |
| 1635 | 1635 | EOD; |
| 1636 | - $this->backend->createCalendarObject($calendarId, $uri3, $calData); |
|
| 1637 | - $deleteChanges = $this->db->getQueryBuilder(); |
|
| 1638 | - $deleteChanges->delete('calendarchanges') |
|
| 1639 | - ->where($deleteChanges->expr()->eq('calendarid', $deleteChanges->createNamedParameter($calendarId))); |
|
| 1640 | - $deleteChanges->executeStatement(); |
|
| 1641 | - |
|
| 1642 | - $this->backend->restoreChanges($calendarId); |
|
| 1643 | - |
|
| 1644 | - $changesAfter = $this->backend->getChangesForCalendar($calendarId, $changesBefore['syncToken'], 1); |
|
| 1645 | - self::assertEquals([], $changesAfter['added']); |
|
| 1646 | - self::assertEqualsCanonicalizing([$uri1, $uri3], $changesAfter['modified']); |
|
| 1647 | - self::assertEquals([$uri2], $changesAfter['deleted']); |
|
| 1648 | - } |
|
| 1649 | - |
|
| 1650 | - public function testSearchWithLimitAndTimeRange(): void { |
|
| 1651 | - $calendarId = $this->createTestCalendar(); |
|
| 1652 | - $calendarInfo = [ |
|
| 1653 | - 'id' => $calendarId, |
|
| 1654 | - 'principaluri' => 'user1', |
|
| 1655 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1656 | - ]; |
|
| 1657 | - |
|
| 1658 | - $testFiles = [ |
|
| 1659 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1660 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1661 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1662 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1663 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1664 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1665 | - ]; |
|
| 1666 | - |
|
| 1667 | - foreach ($testFiles as $testFile) { |
|
| 1668 | - $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1669 | - $calendarData = \file_get_contents($testFile); |
|
| 1670 | - $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1671 | - } |
|
| 1672 | - |
|
| 1673 | - $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1674 | - $end = $start->add(new DateInterval('P14D')); |
|
| 1675 | - |
|
| 1676 | - $results = $this->backend->search( |
|
| 1677 | - $calendarInfo, |
|
| 1678 | - '', |
|
| 1679 | - [], |
|
| 1680 | - [ |
|
| 1681 | - 'timerange' => [ |
|
| 1682 | - 'start' => $start, |
|
| 1683 | - 'end' => $end, |
|
| 1684 | - ] |
|
| 1685 | - ], |
|
| 1686 | - 4, |
|
| 1687 | - null, |
|
| 1688 | - ); |
|
| 1689 | - |
|
| 1690 | - $this->assertCount(2, $results); |
|
| 1691 | - |
|
| 1692 | - $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1693 | - $this->assertGreaterThanOrEqual( |
|
| 1694 | - $start->getTimestamp(), |
|
| 1695 | - $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1696 | - 'Recurrence starting before requested start', |
|
| 1697 | - ); |
|
| 1698 | - |
|
| 1699 | - $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1700 | - $this->assertGreaterThanOrEqual( |
|
| 1701 | - $start->getTimestamp(), |
|
| 1702 | - $results[1]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1703 | - 'Recurrence starting before requested start', |
|
| 1704 | - ); |
|
| 1705 | - } |
|
| 1706 | - |
|
| 1707 | - public function testSearchWithLimitAndTimeRangeShouldNotReturnMoreObjectsThenLimit(): void { |
|
| 1708 | - $calendarId = $this->createTestCalendar(); |
|
| 1709 | - $calendarInfo = [ |
|
| 1710 | - 'id' => $calendarId, |
|
| 1711 | - 'principaluri' => 'user1', |
|
| 1712 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1713 | - ]; |
|
| 1714 | - |
|
| 1715 | - $testFiles = [ |
|
| 1716 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1717 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1718 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1719 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1720 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1721 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1722 | - ]; |
|
| 1723 | - |
|
| 1724 | - foreach ($testFiles as $testFile) { |
|
| 1725 | - $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1726 | - $calendarData = \file_get_contents($testFile); |
|
| 1727 | - $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1728 | - } |
|
| 1729 | - |
|
| 1730 | - $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1731 | - $end = $start->add(new DateInterval('P14D')); |
|
| 1732 | - |
|
| 1733 | - $results = $this->backend->search( |
|
| 1734 | - $calendarInfo, |
|
| 1735 | - '', |
|
| 1736 | - [], |
|
| 1737 | - [ |
|
| 1738 | - 'timerange' => [ |
|
| 1739 | - 'start' => $start, |
|
| 1740 | - 'end' => $end, |
|
| 1741 | - ] |
|
| 1742 | - ], |
|
| 1743 | - 1, |
|
| 1744 | - null, |
|
| 1745 | - ); |
|
| 1746 | - |
|
| 1747 | - $this->assertCount(1, $results); |
|
| 1748 | - |
|
| 1749 | - $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1750 | - $this->assertGreaterThanOrEqual( |
|
| 1751 | - $start->getTimestamp(), |
|
| 1752 | - $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1753 | - 'Recurrence starting before requested start', |
|
| 1754 | - ); |
|
| 1755 | - } |
|
| 1756 | - |
|
| 1757 | - public function testSearchWithLimitAndTimeRangeShouldReturnObjectsInTheSameOrder(): void { |
|
| 1758 | - $calendarId = $this->createTestCalendar(); |
|
| 1759 | - $calendarInfo = [ |
|
| 1760 | - 'id' => $calendarId, |
|
| 1761 | - 'principaluri' => 'user1', |
|
| 1762 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1763 | - ]; |
|
| 1764 | - |
|
| 1765 | - $testFiles = [ |
|
| 1766 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1767 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1768 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1769 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1770 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1771 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1772 | - ]; |
|
| 1773 | - |
|
| 1774 | - foreach ($testFiles as $testFile) { |
|
| 1775 | - $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1776 | - $calendarData = \file_get_contents($testFile); |
|
| 1777 | - $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1778 | - } |
|
| 1779 | - |
|
| 1780 | - $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1781 | - $end = $start->add(new DateInterval('P14D')); |
|
| 1782 | - |
|
| 1783 | - $results = $this->backend->search( |
|
| 1784 | - $calendarInfo, |
|
| 1785 | - '', |
|
| 1786 | - [], |
|
| 1787 | - [ |
|
| 1788 | - 'timerange' => [ |
|
| 1789 | - 'start' => $start, |
|
| 1790 | - 'end' => $end, |
|
| 1791 | - ] |
|
| 1792 | - ], |
|
| 1793 | - 2, |
|
| 1794 | - null, |
|
| 1795 | - ); |
|
| 1796 | - |
|
| 1797 | - $this->assertCount(2, $results); |
|
| 1798 | - |
|
| 1799 | - $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1800 | - $this->assertGreaterThanOrEqual( |
|
| 1801 | - $start->getTimestamp(), |
|
| 1802 | - $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1803 | - 'Recurrence starting before requested start', |
|
| 1804 | - ); |
|
| 1805 | - |
|
| 1806 | - $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1807 | - $this->assertGreaterThanOrEqual( |
|
| 1808 | - $start->getTimestamp(), |
|
| 1809 | - $results[1]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1810 | - 'Recurrence starting before requested start', |
|
| 1811 | - ); |
|
| 1812 | - } |
|
| 1813 | - |
|
| 1814 | - public function testSearchShouldReturnObjectsInTheSameOrderMissingDate(): void { |
|
| 1815 | - $calendarId = $this->createTestCalendar(); |
|
| 1816 | - $calendarInfo = [ |
|
| 1817 | - 'id' => $calendarId, |
|
| 1818 | - 'principaluri' => 'user1', |
|
| 1819 | - '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1820 | - ]; |
|
| 1821 | - |
|
| 1822 | - $testFiles = [ |
|
| 1823 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1824 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1825 | - __DIR__ . '/../test_fixtures/caldav-search-missing-start-1.ics', |
|
| 1826 | - __DIR__ . '/../test_fixtures/caldav-search-missing-start-2.ics', |
|
| 1827 | - ]; |
|
| 1828 | - |
|
| 1829 | - foreach ($testFiles as $testFile) { |
|
| 1830 | - $objectUri = static::getUniqueID('search-return-objects-in-same-order-'); |
|
| 1831 | - $calendarData = \file_get_contents($testFile); |
|
| 1832 | - $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1833 | - } |
|
| 1834 | - |
|
| 1835 | - $results = $this->backend->search( |
|
| 1836 | - $calendarInfo, |
|
| 1837 | - '', |
|
| 1838 | - [], |
|
| 1839 | - [], |
|
| 1840 | - 4, |
|
| 1841 | - null, |
|
| 1842 | - ); |
|
| 1843 | - |
|
| 1844 | - $this->assertCount(4, $results); |
|
| 1845 | - |
|
| 1846 | - $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1847 | - $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1848 | - $this->assertEquals('Missing DTSTART 1', $results[2]['objects'][0]['SUMMARY'][0]); |
|
| 1849 | - $this->assertEquals('Missing DTSTART 2', $results[3]['objects'][0]['SUMMARY'][0]); |
|
| 1850 | - } |
|
| 1851 | - |
|
| 1852 | - public function testUnshare(): void { |
|
| 1853 | - $principalGroup = 'principal:' . self::UNIT_TEST_GROUP; |
|
| 1854 | - $principalUser = 'principal:' . self::UNIT_TEST_USER; |
|
| 1855 | - |
|
| 1856 | - $l10n = $this->createMock(IL10N::class); |
|
| 1857 | - $l10n->method('t') |
|
| 1858 | - ->willReturnCallback(fn ($text, $parameters = []) => vsprintf($text, $parameters)); |
|
| 1859 | - $config = $this->createMock(IConfig::class); |
|
| 1860 | - $logger = new NullLogger(); |
|
| 1861 | - |
|
| 1862 | - $this->principal->expects($this->exactly(2)) |
|
| 1863 | - ->method('findByUri') |
|
| 1864 | - ->willReturnMap([ |
|
| 1865 | - [$principalGroup, '', self::UNIT_TEST_GROUP], |
|
| 1866 | - [$principalUser, '', self::UNIT_TEST_USER], |
|
| 1867 | - ]); |
|
| 1868 | - $this->groupManager->expects($this->once()) |
|
| 1869 | - ->method('groupExists') |
|
| 1870 | - ->willReturn(true); |
|
| 1871 | - $this->dispatcher->expects($this->exactly(2)) |
|
| 1872 | - ->method('dispatchTyped'); |
|
| 1873 | - |
|
| 1874 | - $calendarId = $this->createTestCalendar(); |
|
| 1875 | - $calendarInfo = $this->backend->getCalendarById($calendarId); |
|
| 1876 | - |
|
| 1877 | - $calendar = new Calendar($this->backend, $calendarInfo, $l10n, $config, $logger); |
|
| 1878 | - |
|
| 1879 | - $this->backend->updateShares( |
|
| 1880 | - shareable: $calendar, |
|
| 1881 | - add: [ |
|
| 1882 | - ['href' => $principalGroup, 'readOnly' => false] |
|
| 1883 | - ], |
|
| 1884 | - remove: [] |
|
| 1885 | - ); |
|
| 1886 | - |
|
| 1887 | - $this->backend->unshare( |
|
| 1888 | - shareable: $calendar, |
|
| 1889 | - principal: $principalUser |
|
| 1890 | - ); |
|
| 1891 | - |
|
| 1892 | - } |
|
| 1636 | + $this->backend->createCalendarObject($calendarId, $uri3, $calData); |
|
| 1637 | + $deleteChanges = $this->db->getQueryBuilder(); |
|
| 1638 | + $deleteChanges->delete('calendarchanges') |
|
| 1639 | + ->where($deleteChanges->expr()->eq('calendarid', $deleteChanges->createNamedParameter($calendarId))); |
|
| 1640 | + $deleteChanges->executeStatement(); |
|
| 1641 | + |
|
| 1642 | + $this->backend->restoreChanges($calendarId); |
|
| 1643 | + |
|
| 1644 | + $changesAfter = $this->backend->getChangesForCalendar($calendarId, $changesBefore['syncToken'], 1); |
|
| 1645 | + self::assertEquals([], $changesAfter['added']); |
|
| 1646 | + self::assertEqualsCanonicalizing([$uri1, $uri3], $changesAfter['modified']); |
|
| 1647 | + self::assertEquals([$uri2], $changesAfter['deleted']); |
|
| 1648 | + } |
|
| 1649 | + |
|
| 1650 | + public function testSearchWithLimitAndTimeRange(): void { |
|
| 1651 | + $calendarId = $this->createTestCalendar(); |
|
| 1652 | + $calendarInfo = [ |
|
| 1653 | + 'id' => $calendarId, |
|
| 1654 | + 'principaluri' => 'user1', |
|
| 1655 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1656 | + ]; |
|
| 1657 | + |
|
| 1658 | + $testFiles = [ |
|
| 1659 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1660 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1661 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1662 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1663 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1664 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1665 | + ]; |
|
| 1666 | + |
|
| 1667 | + foreach ($testFiles as $testFile) { |
|
| 1668 | + $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1669 | + $calendarData = \file_get_contents($testFile); |
|
| 1670 | + $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1671 | + } |
|
| 1672 | + |
|
| 1673 | + $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1674 | + $end = $start->add(new DateInterval('P14D')); |
|
| 1675 | + |
|
| 1676 | + $results = $this->backend->search( |
|
| 1677 | + $calendarInfo, |
|
| 1678 | + '', |
|
| 1679 | + [], |
|
| 1680 | + [ |
|
| 1681 | + 'timerange' => [ |
|
| 1682 | + 'start' => $start, |
|
| 1683 | + 'end' => $end, |
|
| 1684 | + ] |
|
| 1685 | + ], |
|
| 1686 | + 4, |
|
| 1687 | + null, |
|
| 1688 | + ); |
|
| 1689 | + |
|
| 1690 | + $this->assertCount(2, $results); |
|
| 1691 | + |
|
| 1692 | + $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1693 | + $this->assertGreaterThanOrEqual( |
|
| 1694 | + $start->getTimestamp(), |
|
| 1695 | + $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1696 | + 'Recurrence starting before requested start', |
|
| 1697 | + ); |
|
| 1698 | + |
|
| 1699 | + $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1700 | + $this->assertGreaterThanOrEqual( |
|
| 1701 | + $start->getTimestamp(), |
|
| 1702 | + $results[1]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1703 | + 'Recurrence starting before requested start', |
|
| 1704 | + ); |
|
| 1705 | + } |
|
| 1706 | + |
|
| 1707 | + public function testSearchWithLimitAndTimeRangeShouldNotReturnMoreObjectsThenLimit(): void { |
|
| 1708 | + $calendarId = $this->createTestCalendar(); |
|
| 1709 | + $calendarInfo = [ |
|
| 1710 | + 'id' => $calendarId, |
|
| 1711 | + 'principaluri' => 'user1', |
|
| 1712 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1713 | + ]; |
|
| 1714 | + |
|
| 1715 | + $testFiles = [ |
|
| 1716 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1717 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1718 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1719 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1720 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1721 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1722 | + ]; |
|
| 1723 | + |
|
| 1724 | + foreach ($testFiles as $testFile) { |
|
| 1725 | + $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1726 | + $calendarData = \file_get_contents($testFile); |
|
| 1727 | + $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1728 | + } |
|
| 1729 | + |
|
| 1730 | + $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1731 | + $end = $start->add(new DateInterval('P14D')); |
|
| 1732 | + |
|
| 1733 | + $results = $this->backend->search( |
|
| 1734 | + $calendarInfo, |
|
| 1735 | + '', |
|
| 1736 | + [], |
|
| 1737 | + [ |
|
| 1738 | + 'timerange' => [ |
|
| 1739 | + 'start' => $start, |
|
| 1740 | + 'end' => $end, |
|
| 1741 | + ] |
|
| 1742 | + ], |
|
| 1743 | + 1, |
|
| 1744 | + null, |
|
| 1745 | + ); |
|
| 1746 | + |
|
| 1747 | + $this->assertCount(1, $results); |
|
| 1748 | + |
|
| 1749 | + $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1750 | + $this->assertGreaterThanOrEqual( |
|
| 1751 | + $start->getTimestamp(), |
|
| 1752 | + $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1753 | + 'Recurrence starting before requested start', |
|
| 1754 | + ); |
|
| 1755 | + } |
|
| 1756 | + |
|
| 1757 | + public function testSearchWithLimitAndTimeRangeShouldReturnObjectsInTheSameOrder(): void { |
|
| 1758 | + $calendarId = $this->createTestCalendar(); |
|
| 1759 | + $calendarInfo = [ |
|
| 1760 | + 'id' => $calendarId, |
|
| 1761 | + 'principaluri' => 'user1', |
|
| 1762 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1763 | + ]; |
|
| 1764 | + |
|
| 1765 | + $testFiles = [ |
|
| 1766 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1767 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1768 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1769 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1770 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1771 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1772 | + ]; |
|
| 1773 | + |
|
| 1774 | + foreach ($testFiles as $testFile) { |
|
| 1775 | + $objectUri = static::getUniqueID('search-limit-timerange-'); |
|
| 1776 | + $calendarData = \file_get_contents($testFile); |
|
| 1777 | + $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1778 | + } |
|
| 1779 | + |
|
| 1780 | + $start = new DateTimeImmutable('2024-05-06T00:00:00Z'); |
|
| 1781 | + $end = $start->add(new DateInterval('P14D')); |
|
| 1782 | + |
|
| 1783 | + $results = $this->backend->search( |
|
| 1784 | + $calendarInfo, |
|
| 1785 | + '', |
|
| 1786 | + [], |
|
| 1787 | + [ |
|
| 1788 | + 'timerange' => [ |
|
| 1789 | + 'start' => $start, |
|
| 1790 | + 'end' => $end, |
|
| 1791 | + ] |
|
| 1792 | + ], |
|
| 1793 | + 2, |
|
| 1794 | + null, |
|
| 1795 | + ); |
|
| 1796 | + |
|
| 1797 | + $this->assertCount(2, $results); |
|
| 1798 | + |
|
| 1799 | + $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1800 | + $this->assertGreaterThanOrEqual( |
|
| 1801 | + $start->getTimestamp(), |
|
| 1802 | + $results[0]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1803 | + 'Recurrence starting before requested start', |
|
| 1804 | + ); |
|
| 1805 | + |
|
| 1806 | + $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1807 | + $this->assertGreaterThanOrEqual( |
|
| 1808 | + $start->getTimestamp(), |
|
| 1809 | + $results[1]['objects'][0]['DTSTART'][0]->getTimestamp(), |
|
| 1810 | + 'Recurrence starting before requested start', |
|
| 1811 | + ); |
|
| 1812 | + } |
|
| 1813 | + |
|
| 1814 | + public function testSearchShouldReturnObjectsInTheSameOrderMissingDate(): void { |
|
| 1815 | + $calendarId = $this->createTestCalendar(); |
|
| 1816 | + $calendarInfo = [ |
|
| 1817 | + 'id' => $calendarId, |
|
| 1818 | + 'principaluri' => 'user1', |
|
| 1819 | + '{http://owncloud.org/ns}owner-principal' => 'user1', |
|
| 1820 | + ]; |
|
| 1821 | + |
|
| 1822 | + $testFiles = [ |
|
| 1823 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1824 | + __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1825 | + __DIR__ . '/../test_fixtures/caldav-search-missing-start-1.ics', |
|
| 1826 | + __DIR__ . '/../test_fixtures/caldav-search-missing-start-2.ics', |
|
| 1827 | + ]; |
|
| 1828 | + |
|
| 1829 | + foreach ($testFiles as $testFile) { |
|
| 1830 | + $objectUri = static::getUniqueID('search-return-objects-in-same-order-'); |
|
| 1831 | + $calendarData = \file_get_contents($testFile); |
|
| 1832 | + $this->backend->createCalendarObject($calendarId, $objectUri, $calendarData); |
|
| 1833 | + } |
|
| 1834 | + |
|
| 1835 | + $results = $this->backend->search( |
|
| 1836 | + $calendarInfo, |
|
| 1837 | + '', |
|
| 1838 | + [], |
|
| 1839 | + [], |
|
| 1840 | + 4, |
|
| 1841 | + null, |
|
| 1842 | + ); |
|
| 1843 | + |
|
| 1844 | + $this->assertCount(4, $results); |
|
| 1845 | + |
|
| 1846 | + $this->assertEquals('Cake Tasting', $results[0]['objects'][0]['SUMMARY'][0]); |
|
| 1847 | + $this->assertEquals('Pasta Day', $results[1]['objects'][0]['SUMMARY'][0]); |
|
| 1848 | + $this->assertEquals('Missing DTSTART 1', $results[2]['objects'][0]['SUMMARY'][0]); |
|
| 1849 | + $this->assertEquals('Missing DTSTART 2', $results[3]['objects'][0]['SUMMARY'][0]); |
|
| 1850 | + } |
|
| 1851 | + |
|
| 1852 | + public function testUnshare(): void { |
|
| 1853 | + $principalGroup = 'principal:' . self::UNIT_TEST_GROUP; |
|
| 1854 | + $principalUser = 'principal:' . self::UNIT_TEST_USER; |
|
| 1855 | + |
|
| 1856 | + $l10n = $this->createMock(IL10N::class); |
|
| 1857 | + $l10n->method('t') |
|
| 1858 | + ->willReturnCallback(fn ($text, $parameters = []) => vsprintf($text, $parameters)); |
|
| 1859 | + $config = $this->createMock(IConfig::class); |
|
| 1860 | + $logger = new NullLogger(); |
|
| 1861 | + |
|
| 1862 | + $this->principal->expects($this->exactly(2)) |
|
| 1863 | + ->method('findByUri') |
|
| 1864 | + ->willReturnMap([ |
|
| 1865 | + [$principalGroup, '', self::UNIT_TEST_GROUP], |
|
| 1866 | + [$principalUser, '', self::UNIT_TEST_USER], |
|
| 1867 | + ]); |
|
| 1868 | + $this->groupManager->expects($this->once()) |
|
| 1869 | + ->method('groupExists') |
|
| 1870 | + ->willReturn(true); |
|
| 1871 | + $this->dispatcher->expects($this->exactly(2)) |
|
| 1872 | + ->method('dispatchTyped'); |
|
| 1873 | + |
|
| 1874 | + $calendarId = $this->createTestCalendar(); |
|
| 1875 | + $calendarInfo = $this->backend->getCalendarById($calendarId); |
|
| 1876 | + |
|
| 1877 | + $calendar = new Calendar($this->backend, $calendarInfo, $l10n, $config, $logger); |
|
| 1878 | + |
|
| 1879 | + $this->backend->updateShares( |
|
| 1880 | + shareable: $calendar, |
|
| 1881 | + add: [ |
|
| 1882 | + ['href' => $principalGroup, 'readOnly' => false] |
|
| 1883 | + ], |
|
| 1884 | + remove: [] |
|
| 1885 | + ); |
|
| 1886 | + |
|
| 1887 | + $this->backend->unshare( |
|
| 1888 | + shareable: $calendar, |
|
| 1889 | + principal: $principalUser |
|
| 1890 | + ); |
|
| 1891 | + |
|
| 1892 | + } |
|
| 1893 | 1893 | } |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | return [ |
| 64 | 64 | [true, true, true, false, [ |
| 65 | 65 | [ |
| 66 | - 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 66 | + 'href' => 'principal:'.self::UNIT_TEST_USER1, |
|
| 67 | 67 | 'readOnly' => false |
| 68 | 68 | ], |
| 69 | 69 | [ |
| 70 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 70 | + 'href' => 'principal:'.self::UNIT_TEST_GROUP, |
|
| 71 | 71 | 'readOnly' => true |
| 72 | 72 | ] |
| 73 | 73 | ], [ |
@@ -76,11 +76,11 @@ discard block |
||
| 76 | 76 | ]], |
| 77 | 77 | [true, true, true, false, [ |
| 78 | 78 | [ |
| 79 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 79 | + 'href' => 'principal:'.self::UNIT_TEST_GROUP, |
|
| 80 | 80 | 'readOnly' => true, |
| 81 | 81 | ], |
| 82 | 82 | [ |
| 83 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 83 | + 'href' => 'principal:'.self::UNIT_TEST_GROUP2, |
|
| 84 | 84 | 'readOnly' => false, |
| 85 | 85 | ], |
| 86 | 86 | ], [ |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | ]], |
| 90 | 90 | [true, true, true, true, [ |
| 91 | 91 | [ |
| 92 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP, |
|
| 92 | + 'href' => 'principal:'.self::UNIT_TEST_GROUP, |
|
| 93 | 93 | 'readOnly' => false, |
| 94 | 94 | ], |
| 95 | 95 | [ |
| 96 | - 'href' => 'principal:' . self::UNIT_TEST_GROUP2, |
|
| 96 | + 'href' => 'principal:'.self::UNIT_TEST_GROUP2, |
|
| 97 | 97 | 'readOnly' => true, |
| 98 | 98 | ], |
| 99 | 99 | ], [ |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ]], |
| 103 | 103 | [true, false, false, false, [ |
| 104 | 104 | [ |
| 105 | - 'href' => 'principal:' . self::UNIT_TEST_USER1, |
|
| 105 | + 'href' => 'principal:'.self::UNIT_TEST_USER1, |
|
| 106 | 106 | 'readOnly' => true |
| 107 | 107 | ], |
| 108 | 108 | ], [ |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $l10n = $this->createMock(IL10N::class); |
| 123 | 123 | $l10n->expects($this->any()) |
| 124 | 124 | ->method('t') |
| 125 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 125 | + ->willReturnCallback(function($text, $parameters = []) { |
|
| 126 | 126 | return vsprintf($text, $parameters); |
| 127 | 127 | }); |
| 128 | 128 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | // delete the calendar |
| 186 | 186 | $this->dispatcher->expects(self::once()) |
| 187 | 187 | ->method('dispatchTyped') |
| 188 | - ->with(self::callback(function ($event) { |
|
| 188 | + ->with(self::callback(function($event) { |
|
| 189 | 189 | return $event instanceof CalendarDeletedEvent; |
| 190 | 190 | })); |
| 191 | 191 | $this->backend->deleteCalendar($calendars[0]['id'], true); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $this->assertArrayHasKey('etag', $calendarObject); |
| 235 | 235 | $this->assertArrayHasKey('size', $calendarObject); |
| 236 | 236 | $this->assertArrayHasKey('classification', $calendarObject); |
| 237 | - $this->assertArrayHasKey('{' . SharingPlugin::NS_NEXTCLOUD . '}deleted-at', $calendarObject); |
|
| 237 | + $this->assertArrayHasKey('{'.SharingPlugin::NS_NEXTCLOUD.'}deleted-at', $calendarObject); |
|
| 238 | 238 | $this->assertEquals($calData, $calendarObject['calendardata']); |
| 239 | 239 | |
| 240 | 240 | // update the card |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $this->assertArrayHasKey('classification', $card); |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | - usort($calendarObjects, function ($a, $b) { |
|
| 385 | + usort($calendarObjects, function($a, $b) { |
|
| 386 | 386 | return $a['id'] - $b['id']; |
| 387 | 387 | }); |
| 388 | 388 | |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | 'comp-filters' => $compFilter |
| 426 | 426 | ]); |
| 427 | 427 | |
| 428 | - $expectedEventsInResult = array_map(function ($index) use ($events) { |
|
| 428 | + $expectedEventsInResult = array_map(function($index) use ($events) { |
|
| 429 | 429 | return $events[$index]; |
| 430 | 430 | }, $expectedEventsInResult); |
| 431 | 431 | $this->assertEqualsCanonicalizing($expectedEventsInResult, $result); |
@@ -462,10 +462,10 @@ discard block |
||
| 462 | 462 | return [ |
| 463 | 463 | 'all' => [[0, 1, 2, 3], [], []], |
| 464 | 464 | 'only-todos' => [[], ['name' => 'VTODO'], []], |
| 465 | - 'only-events' => [[0, 1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => null], 'prop-filters' => []]],], |
|
| 466 | - 'start' => [[1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 467 | - 'end' => [[0], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC'))], 'prop-filters' => []]],], |
|
| 468 | - 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2036-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],], |
|
| 465 | + 'only-events' => [[0, 1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => null], 'prop-filters' => []]], ], |
|
| 466 | + 'start' => [[1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]], ], |
|
| 467 | + 'end' => [[0], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC'))], 'prop-filters' => []]], ], |
|
| 468 | + 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2036-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]], ], |
|
| 469 | 469 | ]; |
| 470 | 470 | } |
| 471 | 471 | |
@@ -1299,7 +1299,7 @@ discard block |
||
| 1299 | 1299 | $l10n |
| 1300 | 1300 | ->expects($this->any()) |
| 1301 | 1301 | ->method('t') |
| 1302 | - ->willReturnCallback(function ($text, $parameters = []) { |
|
| 1302 | + ->willReturnCallback(function($text, $parameters = []) { |
|
| 1303 | 1303 | return vsprintf($text, $parameters); |
| 1304 | 1304 | }); |
| 1305 | 1305 | $config = $this->createMock(IConfig::class); |
@@ -1328,7 +1328,7 @@ discard block |
||
| 1328 | 1328 | $sharerCalendar = new Calendar($this->backend, $sharerCalendars[0], $l10n, $config, $logger); |
| 1329 | 1329 | $this->backend->updateShares($sharerCalendar, [ |
| 1330 | 1330 | [ |
| 1331 | - 'href' => 'principal:' . $me, |
|
| 1331 | + 'href' => 'principal:'.$me, |
|
| 1332 | 1332 | 'readOnly' => false, |
| 1333 | 1333 | ], |
| 1334 | 1334 | ], []); |
@@ -1560,7 +1560,7 @@ discard block |
||
| 1560 | 1560 | |
| 1561 | 1561 | public function testRestoreChanges(): void { |
| 1562 | 1562 | $calendarId = $this->createTestCalendar(); |
| 1563 | - $uri1 = static::getUniqueID('calobj1') . '.ics'; |
|
| 1563 | + $uri1 = static::getUniqueID('calobj1').'.ics'; |
|
| 1564 | 1564 | $calData = <<<EOD |
| 1565 | 1565 | BEGIN:VCALENDAR |
| 1566 | 1566 | VERSION:2.0 |
@@ -1596,7 +1596,7 @@ discard block |
||
| 1596 | 1596 | END:VCALENDAR |
| 1597 | 1597 | EOD; |
| 1598 | 1598 | $this->backend->updateCalendarObject($calendarId, $uri1, $calData); |
| 1599 | - $uri2 = static::getUniqueID('calobj2') . '.ics'; |
|
| 1599 | + $uri2 = static::getUniqueID('calobj2').'.ics'; |
|
| 1600 | 1600 | $calData = <<<EOD |
| 1601 | 1601 | BEGIN:VCALENDAR |
| 1602 | 1602 | VERSION:2.0 |
@@ -1616,7 +1616,7 @@ discard block |
||
| 1616 | 1616 | $this->backend->createCalendarObject($calendarId, $uri2, $calData); |
| 1617 | 1617 | $changesBefore = $this->backend->getChangesForCalendar($calendarId, null, 1); |
| 1618 | 1618 | $this->backend->deleteCalendarObject($calendarId, $uri2); |
| 1619 | - $uri3 = static::getUniqueID('calobj3') . '.ics'; |
|
| 1619 | + $uri3 = static::getUniqueID('calobj3').'.ics'; |
|
| 1620 | 1620 | $calData = <<<EOD |
| 1621 | 1621 | BEGIN:VCALENDAR |
| 1622 | 1622 | VERSION:2.0 |
@@ -1656,12 +1656,12 @@ discard block |
||
| 1656 | 1656 | ]; |
| 1657 | 1657 | |
| 1658 | 1658 | $testFiles = [ |
| 1659 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1660 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1661 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1662 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1663 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1664 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1659 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1660 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1661 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1662 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1663 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1664 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1665 | 1665 | ]; |
| 1666 | 1666 | |
| 1667 | 1667 | foreach ($testFiles as $testFile) { |
@@ -1713,12 +1713,12 @@ discard block |
||
| 1713 | 1713 | ]; |
| 1714 | 1714 | |
| 1715 | 1715 | $testFiles = [ |
| 1716 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1717 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1718 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1719 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1720 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1721 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1716 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1717 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1718 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1719 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1720 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1721 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-6.ics', |
|
| 1722 | 1722 | ]; |
| 1723 | 1723 | |
| 1724 | 1724 | foreach ($testFiles as $testFile) { |
@@ -1763,12 +1763,12 @@ discard block |
||
| 1763 | 1763 | ]; |
| 1764 | 1764 | |
| 1765 | 1765 | $testFiles = [ |
| 1766 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1767 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1768 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1769 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1770 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1771 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1766 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-1.ics', |
|
| 1767 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-2.ics', |
|
| 1768 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-3.ics', |
|
| 1769 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-4.ics', |
|
| 1770 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1771 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1772 | 1772 | ]; |
| 1773 | 1773 | |
| 1774 | 1774 | foreach ($testFiles as $testFile) { |
@@ -1820,10 +1820,10 @@ discard block |
||
| 1820 | 1820 | ]; |
| 1821 | 1821 | |
| 1822 | 1822 | $testFiles = [ |
| 1823 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1824 | - __DIR__ . '/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1825 | - __DIR__ . '/../test_fixtures/caldav-search-missing-start-1.ics', |
|
| 1826 | - __DIR__ . '/../test_fixtures/caldav-search-missing-start-2.ics', |
|
| 1823 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-6.ics', // <-- intentional! |
|
| 1824 | + __DIR__.'/../test_fixtures/caldav-search-limit-timerange-5.ics', |
|
| 1825 | + __DIR__.'/../test_fixtures/caldav-search-missing-start-1.ics', |
|
| 1826 | + __DIR__.'/../test_fixtures/caldav-search-missing-start-2.ics', |
|
| 1827 | 1827 | ]; |
| 1828 | 1828 | |
| 1829 | 1829 | foreach ($testFiles as $testFile) { |
@@ -1850,8 +1850,8 @@ discard block |
||
| 1850 | 1850 | } |
| 1851 | 1851 | |
| 1852 | 1852 | public function testUnshare(): void { |
| 1853 | - $principalGroup = 'principal:' . self::UNIT_TEST_GROUP; |
|
| 1854 | - $principalUser = 'principal:' . self::UNIT_TEST_USER; |
|
| 1853 | + $principalGroup = 'principal:'.self::UNIT_TEST_GROUP; |
|
| 1854 | + $principalUser = 'principal:'.self::UNIT_TEST_USER; |
|
| 1855 | 1855 | |
| 1856 | 1856 | $l10n = $this->createMock(IL10N::class); |
| 1857 | 1857 | $l10n->method('t') |
@@ -28,222 +28,222 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | class CalDavSharingBackendTest extends TestCase { |
| 30 | 30 | |
| 31 | - private IDBConnection $db; |
|
| 32 | - private IUserManager $userManager; |
|
| 33 | - private IGroupManager $groupManager; |
|
| 34 | - private Principal $principalBackend; |
|
| 35 | - private ICacheFactory $cacheFactory; |
|
| 36 | - private LoggerInterface $logger; |
|
| 37 | - private SharingMapper $sharingMapper; |
|
| 38 | - private SharingService $sharingService; |
|
| 39 | - private Backend $sharingBackend; |
|
| 40 | - |
|
| 41 | - private $resourceIds = [10001]; |
|
| 42 | - |
|
| 43 | - protected function setUp(): void { |
|
| 44 | - parent::setUp(); |
|
| 45 | - |
|
| 46 | - $this->db = Server::get(IDBConnection::class); |
|
| 47 | - |
|
| 48 | - $this->userManager = $this->createMock(IUserManager::class); |
|
| 49 | - $this->groupManager = $this->createMock(IGroupManager::class); |
|
| 50 | - $this->principalBackend = $this->createMock(Principal::class); |
|
| 51 | - $this->cacheFactory = $this->createMock(ICacheFactory::class); |
|
| 52 | - $this->cacheFactory->method('createInMemory') |
|
| 53 | - ->willReturn(new \OC\Memcache\NullCache()); |
|
| 54 | - $this->logger = new \Psr\Log\NullLogger(); |
|
| 55 | - |
|
| 56 | - $this->sharingMapper = new SharingMapper($this->db); |
|
| 57 | - $this->sharingService = new \OCA\DAV\CalDAV\Sharing\Service($this->sharingMapper); |
|
| 58 | - |
|
| 59 | - $this->sharingBackend = new \OCA\DAV\CalDAV\Sharing\Backend( |
|
| 60 | - $this->userManager, |
|
| 61 | - $this->groupManager, |
|
| 62 | - $this->principalBackend, |
|
| 63 | - $this->cacheFactory, |
|
| 64 | - $this->sharingService, |
|
| 65 | - $this->logger |
|
| 66 | - ); |
|
| 67 | - |
|
| 68 | - $this->removeFixtures(); |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - protected function tearDown(): void { |
|
| 72 | - $this->removeFixtures(); |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - protected function removeFixtures(): void { |
|
| 76 | - $qb = $this->db->getQueryBuilder(); |
|
| 77 | - $qb->delete('dav_shares') |
|
| 78 | - ->where($qb->expr()->in('resourceid', $qb->createNamedParameter($this->resourceIds, IQueryBuilder::PARAM_INT_ARRAY))); |
|
| 79 | - $qb->executeStatement(); |
|
| 80 | - } |
|
| 81 | - |
|
| 82 | - public function testShareCalendarWithGroup(): void { |
|
| 83 | - $calendar = $this->createMock(Calendar::class); |
|
| 84 | - $calendar->method('getResourceId') |
|
| 85 | - ->willReturn(10001); |
|
| 86 | - $calendar->method('getOwner') |
|
| 87 | - ->willReturn('principals/users/admin'); |
|
| 88 | - |
|
| 89 | - $this->principalBackend->method('findByUri') |
|
| 90 | - ->willReturn('principals/groups/alice_bob'); |
|
| 91 | - |
|
| 92 | - $this->groupManager->method('groupExists') |
|
| 93 | - ->willReturn(true); |
|
| 94 | - |
|
| 95 | - $this->sharingBackend->updateShares( |
|
| 96 | - $calendar, |
|
| 97 | - [['href' => 'principals/groups/alice_bob']], |
|
| 98 | - [], |
|
| 99 | - [] |
|
| 100 | - ); |
|
| 101 | - |
|
| 102 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - public function testUnshareCalendarFromGroup(): void { |
|
| 106 | - $calendar = $this->createMock(Calendar::class); |
|
| 107 | - $calendar->method('getResourceId') |
|
| 108 | - ->willReturn(10001); |
|
| 109 | - $calendar->method('getOwner') |
|
| 110 | - ->willReturn('principals/users/admin'); |
|
| 111 | - |
|
| 112 | - $this->principalBackend->method('findByUri') |
|
| 113 | - ->willReturn('principals/groups/alice_bob'); |
|
| 114 | - |
|
| 115 | - $this->groupManager->method('groupExists') |
|
| 116 | - ->willReturn(true); |
|
| 117 | - |
|
| 118 | - $this->sharingBackend->updateShares( |
|
| 119 | - shareable: $calendar, |
|
| 120 | - add: [['href' => 'principals/groups/alice_bob']], |
|
| 121 | - remove: [], |
|
| 122 | - ); |
|
| 123 | - |
|
| 124 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 125 | - |
|
| 126 | - $this->sharingBackend->updateShares( |
|
| 127 | - shareable: $calendar, |
|
| 128 | - add: [], |
|
| 129 | - remove: ['principals/groups/alice_bob'], |
|
| 130 | - ); |
|
| 131 | - |
|
| 132 | - $this->assertCount(0, $this->sharingService->getShares(10001)); |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - public function testShareCalendarWithGroupAndUnshareAsUser(): void { |
|
| 136 | - $calendar = $this->createMock(Calendar::class); |
|
| 137 | - $calendar->method('getResourceId') |
|
| 138 | - ->willReturn(10001); |
|
| 139 | - $calendar->method('getOwner') |
|
| 140 | - ->willReturn('principals/users/admin'); |
|
| 141 | - |
|
| 142 | - $this->principalBackend->method('findByUri') |
|
| 143 | - ->willReturnMap([ |
|
| 144 | - ['principals/groups/alice_bob', '', 'principals/groups/alice_bob'], |
|
| 145 | - ['principals/users/bob', '', 'principals/users/bob'], |
|
| 146 | - ]); |
|
| 147 | - $this->principalBackend->method('getGroupMembership') |
|
| 148 | - ->willReturn([ |
|
| 149 | - 'principals/groups/alice_bob', |
|
| 150 | - ]); |
|
| 151 | - $this->principalBackend->method('getCircleMembership') |
|
| 152 | - ->willReturn([]); |
|
| 153 | - |
|
| 154 | - $this->groupManager->method('groupExists') |
|
| 155 | - ->willReturn(true); |
|
| 156 | - |
|
| 157 | - /* |
|
| 31 | + private IDBConnection $db; |
|
| 32 | + private IUserManager $userManager; |
|
| 33 | + private IGroupManager $groupManager; |
|
| 34 | + private Principal $principalBackend; |
|
| 35 | + private ICacheFactory $cacheFactory; |
|
| 36 | + private LoggerInterface $logger; |
|
| 37 | + private SharingMapper $sharingMapper; |
|
| 38 | + private SharingService $sharingService; |
|
| 39 | + private Backend $sharingBackend; |
|
| 40 | + |
|
| 41 | + private $resourceIds = [10001]; |
|
| 42 | + |
|
| 43 | + protected function setUp(): void { |
|
| 44 | + parent::setUp(); |
|
| 45 | + |
|
| 46 | + $this->db = Server::get(IDBConnection::class); |
|
| 47 | + |
|
| 48 | + $this->userManager = $this->createMock(IUserManager::class); |
|
| 49 | + $this->groupManager = $this->createMock(IGroupManager::class); |
|
| 50 | + $this->principalBackend = $this->createMock(Principal::class); |
|
| 51 | + $this->cacheFactory = $this->createMock(ICacheFactory::class); |
|
| 52 | + $this->cacheFactory->method('createInMemory') |
|
| 53 | + ->willReturn(new \OC\Memcache\NullCache()); |
|
| 54 | + $this->logger = new \Psr\Log\NullLogger(); |
|
| 55 | + |
|
| 56 | + $this->sharingMapper = new SharingMapper($this->db); |
|
| 57 | + $this->sharingService = new \OCA\DAV\CalDAV\Sharing\Service($this->sharingMapper); |
|
| 58 | + |
|
| 59 | + $this->sharingBackend = new \OCA\DAV\CalDAV\Sharing\Backend( |
|
| 60 | + $this->userManager, |
|
| 61 | + $this->groupManager, |
|
| 62 | + $this->principalBackend, |
|
| 63 | + $this->cacheFactory, |
|
| 64 | + $this->sharingService, |
|
| 65 | + $this->logger |
|
| 66 | + ); |
|
| 67 | + |
|
| 68 | + $this->removeFixtures(); |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + protected function tearDown(): void { |
|
| 72 | + $this->removeFixtures(); |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + protected function removeFixtures(): void { |
|
| 76 | + $qb = $this->db->getQueryBuilder(); |
|
| 77 | + $qb->delete('dav_shares') |
|
| 78 | + ->where($qb->expr()->in('resourceid', $qb->createNamedParameter($this->resourceIds, IQueryBuilder::PARAM_INT_ARRAY))); |
|
| 79 | + $qb->executeStatement(); |
|
| 80 | + } |
|
| 81 | + |
|
| 82 | + public function testShareCalendarWithGroup(): void { |
|
| 83 | + $calendar = $this->createMock(Calendar::class); |
|
| 84 | + $calendar->method('getResourceId') |
|
| 85 | + ->willReturn(10001); |
|
| 86 | + $calendar->method('getOwner') |
|
| 87 | + ->willReturn('principals/users/admin'); |
|
| 88 | + |
|
| 89 | + $this->principalBackend->method('findByUri') |
|
| 90 | + ->willReturn('principals/groups/alice_bob'); |
|
| 91 | + |
|
| 92 | + $this->groupManager->method('groupExists') |
|
| 93 | + ->willReturn(true); |
|
| 94 | + |
|
| 95 | + $this->sharingBackend->updateShares( |
|
| 96 | + $calendar, |
|
| 97 | + [['href' => 'principals/groups/alice_bob']], |
|
| 98 | + [], |
|
| 99 | + [] |
|
| 100 | + ); |
|
| 101 | + |
|
| 102 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + public function testUnshareCalendarFromGroup(): void { |
|
| 106 | + $calendar = $this->createMock(Calendar::class); |
|
| 107 | + $calendar->method('getResourceId') |
|
| 108 | + ->willReturn(10001); |
|
| 109 | + $calendar->method('getOwner') |
|
| 110 | + ->willReturn('principals/users/admin'); |
|
| 111 | + |
|
| 112 | + $this->principalBackend->method('findByUri') |
|
| 113 | + ->willReturn('principals/groups/alice_bob'); |
|
| 114 | + |
|
| 115 | + $this->groupManager->method('groupExists') |
|
| 116 | + ->willReturn(true); |
|
| 117 | + |
|
| 118 | + $this->sharingBackend->updateShares( |
|
| 119 | + shareable: $calendar, |
|
| 120 | + add: [['href' => 'principals/groups/alice_bob']], |
|
| 121 | + remove: [], |
|
| 122 | + ); |
|
| 123 | + |
|
| 124 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 125 | + |
|
| 126 | + $this->sharingBackend->updateShares( |
|
| 127 | + shareable: $calendar, |
|
| 128 | + add: [], |
|
| 129 | + remove: ['principals/groups/alice_bob'], |
|
| 130 | + ); |
|
| 131 | + |
|
| 132 | + $this->assertCount(0, $this->sharingService->getShares(10001)); |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + public function testShareCalendarWithGroupAndUnshareAsUser(): void { |
|
| 136 | + $calendar = $this->createMock(Calendar::class); |
|
| 137 | + $calendar->method('getResourceId') |
|
| 138 | + ->willReturn(10001); |
|
| 139 | + $calendar->method('getOwner') |
|
| 140 | + ->willReturn('principals/users/admin'); |
|
| 141 | + |
|
| 142 | + $this->principalBackend->method('findByUri') |
|
| 143 | + ->willReturnMap([ |
|
| 144 | + ['principals/groups/alice_bob', '', 'principals/groups/alice_bob'], |
|
| 145 | + ['principals/users/bob', '', 'principals/users/bob'], |
|
| 146 | + ]); |
|
| 147 | + $this->principalBackend->method('getGroupMembership') |
|
| 148 | + ->willReturn([ |
|
| 149 | + 'principals/groups/alice_bob', |
|
| 150 | + ]); |
|
| 151 | + $this->principalBackend->method('getCircleMembership') |
|
| 152 | + ->willReturn([]); |
|
| 153 | + |
|
| 154 | + $this->groupManager->method('groupExists') |
|
| 155 | + ->willReturn(true); |
|
| 156 | + |
|
| 157 | + /* |
|
| 158 | 158 | * Owner is sharing the calendar with a group. |
| 159 | 159 | */ |
| 160 | - $this->sharingBackend->updateShares( |
|
| 161 | - shareable: $calendar, |
|
| 162 | - add: [['href' => 'principals/groups/alice_bob']], |
|
| 163 | - remove: [], |
|
| 164 | - ); |
|
| 160 | + $this->sharingBackend->updateShares( |
|
| 161 | + shareable: $calendar, |
|
| 162 | + add: [['href' => 'principals/groups/alice_bob']], |
|
| 163 | + remove: [], |
|
| 164 | + ); |
|
| 165 | 165 | |
| 166 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 166 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 167 | 167 | |
| 168 | - /* |
|
| 168 | + /* |
|
| 169 | 169 | * Member of the group unshares the calendar. |
| 170 | 170 | */ |
| 171 | - $this->sharingBackend->unshare( |
|
| 172 | - shareable: $calendar, |
|
| 173 | - principalUri: 'principals/users/bob' |
|
| 174 | - ); |
|
| 175 | - |
|
| 176 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 177 | - $this->assertCount(1, $this->sharingService->getUnshares(10001)); |
|
| 178 | - } |
|
| 179 | - |
|
| 180 | - /** |
|
| 181 | - * Tests the functionality of sharing a calendar with a user, then with a group (that includes the shared user), |
|
| 182 | - * and subsequently unsharing it from the individual user. Verifies that the unshare operation correctly removes the specific user share |
|
| 183 | - * without creating an additional unshare entry. |
|
| 184 | - */ |
|
| 185 | - public function testShareCalendarWithUserThenGroupThenUnshareUser(): void { |
|
| 186 | - $calendar = $this->createMock(Calendar::class); |
|
| 187 | - $calendar->method('getResourceId') |
|
| 188 | - ->willReturn(10001); |
|
| 189 | - $calendar->method('getOwner') |
|
| 190 | - ->willReturn('principals/users/admin'); |
|
| 191 | - |
|
| 192 | - $this->principalBackend->method('findByUri') |
|
| 193 | - ->willReturnMap([ |
|
| 194 | - ['principals/groups/alice_bob', '', 'principals/groups/alice_bob'], |
|
| 195 | - ['principals/users/bob', '', 'principals/users/bob'], |
|
| 196 | - ]); |
|
| 197 | - $this->principalBackend->method('getGroupMembership') |
|
| 198 | - ->willReturn([ |
|
| 199 | - 'principals/groups/alice_bob', |
|
| 200 | - ]); |
|
| 201 | - $this->principalBackend->method('getCircleMembership') |
|
| 202 | - ->willReturn([]); |
|
| 203 | - |
|
| 204 | - $this->userManager->method('userExists') |
|
| 205 | - ->willReturn(true); |
|
| 206 | - $this->groupManager->method('groupExists') |
|
| 207 | - ->willReturn(true); |
|
| 208 | - |
|
| 209 | - /* |
|
| 171 | + $this->sharingBackend->unshare( |
|
| 172 | + shareable: $calendar, |
|
| 173 | + principalUri: 'principals/users/bob' |
|
| 174 | + ); |
|
| 175 | + |
|
| 176 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 177 | + $this->assertCount(1, $this->sharingService->getUnshares(10001)); |
|
| 178 | + } |
|
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * Tests the functionality of sharing a calendar with a user, then with a group (that includes the shared user), |
|
| 182 | + * and subsequently unsharing it from the individual user. Verifies that the unshare operation correctly removes the specific user share |
|
| 183 | + * without creating an additional unshare entry. |
|
| 184 | + */ |
|
| 185 | + public function testShareCalendarWithUserThenGroupThenUnshareUser(): void { |
|
| 186 | + $calendar = $this->createMock(Calendar::class); |
|
| 187 | + $calendar->method('getResourceId') |
|
| 188 | + ->willReturn(10001); |
|
| 189 | + $calendar->method('getOwner') |
|
| 190 | + ->willReturn('principals/users/admin'); |
|
| 191 | + |
|
| 192 | + $this->principalBackend->method('findByUri') |
|
| 193 | + ->willReturnMap([ |
|
| 194 | + ['principals/groups/alice_bob', '', 'principals/groups/alice_bob'], |
|
| 195 | + ['principals/users/bob', '', 'principals/users/bob'], |
|
| 196 | + ]); |
|
| 197 | + $this->principalBackend->method('getGroupMembership') |
|
| 198 | + ->willReturn([ |
|
| 199 | + 'principals/groups/alice_bob', |
|
| 200 | + ]); |
|
| 201 | + $this->principalBackend->method('getCircleMembership') |
|
| 202 | + ->willReturn([]); |
|
| 203 | + |
|
| 204 | + $this->userManager->method('userExists') |
|
| 205 | + ->willReturn(true); |
|
| 206 | + $this->groupManager->method('groupExists') |
|
| 207 | + ->willReturn(true); |
|
| 208 | + |
|
| 209 | + /* |
|
| 210 | 210 | * Step 1) The owner shares the calendar with a user. |
| 211 | 211 | */ |
| 212 | - $this->sharingBackend->updateShares( |
|
| 213 | - shareable: $calendar, |
|
| 214 | - add: [['href' => 'principals/users/bob']], |
|
| 215 | - remove: [], |
|
| 216 | - ); |
|
| 212 | + $this->sharingBackend->updateShares( |
|
| 213 | + shareable: $calendar, |
|
| 214 | + add: [['href' => 'principals/users/bob']], |
|
| 215 | + remove: [], |
|
| 216 | + ); |
|
| 217 | 217 | |
| 218 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 218 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 219 | 219 | |
| 220 | - /* |
|
| 220 | + /* |
|
| 221 | 221 | * Step 2) The owner shares the calendar with a group that includes the |
| 222 | 222 | * user from step 1 as a member. |
| 223 | 223 | */ |
| 224 | - $this->sharingBackend->updateShares( |
|
| 225 | - shareable: $calendar, |
|
| 226 | - add: [['href' => 'principals/groups/alice_bob']], |
|
| 227 | - remove: [], |
|
| 228 | - ); |
|
| 224 | + $this->sharingBackend->updateShares( |
|
| 225 | + shareable: $calendar, |
|
| 226 | + add: [['href' => 'principals/groups/alice_bob']], |
|
| 227 | + remove: [], |
|
| 228 | + ); |
|
| 229 | 229 | |
| 230 | - $this->assertCount(2, $this->sharingService->getShares(10001)); |
|
| 230 | + $this->assertCount(2, $this->sharingService->getShares(10001)); |
|
| 231 | 231 | |
| 232 | - /* |
|
| 232 | + /* |
|
| 233 | 233 | * Step 3) Unshare the calendar from user as owner. |
| 234 | 234 | */ |
| 235 | - $this->sharingBackend->updateShares( |
|
| 236 | - shareable: $calendar, |
|
| 237 | - add: [], |
|
| 238 | - remove: ['principals/users/bob'], |
|
| 239 | - ); |
|
| 235 | + $this->sharingBackend->updateShares( |
|
| 236 | + shareable: $calendar, |
|
| 237 | + add: [], |
|
| 238 | + remove: ['principals/users/bob'], |
|
| 239 | + ); |
|
| 240 | 240 | |
| 241 | - /* |
|
| 241 | + /* |
|
| 242 | 242 | * The purpose of this test is to ensure that removing a user from a share, as the owner, does not result in an "unshare" row being added. |
| 243 | 243 | * Instead, the actual user share should be removed. |
| 244 | 244 | */ |
| 245 | - $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 246 | - $this->assertCount(0, $this->sharingService->getUnshares(10001)); |
|
| 247 | - } |
|
| 245 | + $this->assertCount(1, $this->sharingService->getShares(10001)); |
|
| 246 | + $this->assertCount(0, $this->sharingService->getUnshares(10001)); |
|
| 247 | + } |
|
| 248 | 248 | |
| 249 | 249 | } |