aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2021-05-07 16:47:44 +0200
committerGitHub <noreply@github.com>2021-05-07 16:47:44 +0200
commitf8c519f5f0b52075c5b343233a5e48f9bc8cf3aa (patch)
tree6e780de6cf25cd57642e2929198f7bb7078a7839 /apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
parented2d6eee1e45a54167d628eb31fc12b0d019c0d5 (diff)
parentf5462650f1480bf23a58285e0e4476957a0720db (diff)
downloadnextcloud-server-f8c519f5f0b52075c5b343233a5e48f9bc8cf3aa.tar.gz
nextcloud-server-f8c519f5f0b52075c5b343233a5e48f9bc8cf3aa.zip
Merge pull request #26913 from nextcloud/chore/dav-calendar-object-untyped-events
Drop some more untyped events from the dav code
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php')
-rw-r--r--apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
index b512847a7e8..17ac839b5f2 100644
--- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
+++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
@@ -32,6 +32,7 @@ use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CalDAV\Proxy\ProxyMapper;
use OCA\DAV\Connector\Sabre\Principal;
use OCA\DAV\Events\CalendarDeletedEvent;
+use OCA\DAV\Events\CalendarObjectCreatedEvent;
use OCP\App\IAppManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
@@ -206,9 +207,11 @@ END:VCALENDAR
EOD;
$uri0 = $this->getUniqueID('event');
- $this->legacyDispatcher->expects($this->at(0))
- ->method('dispatch')
- ->with('\OCA\DAV\CalDAV\CalDavBackend::createCalendarObject');
+ $this->dispatcher->expects(self::once())
+ ->method('dispatchTyped')
+ ->with(self::callback(function ($event) {
+ return $event instanceof CalendarObjectCreatedEvent;
+ }));
$this->backend->createCalendarObject($calendarId, $uri0, $calData);