diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-12-08 09:39:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 09:39:45 +0100 |
commit | fda6ffc866cf8c5d3579fe95d1731ab747894002 (patch) | |
tree | 7f24f9a2bc0972d8396cca2bdc7db8d25dc1ed3e /apps/dav/tests | |
parent | 7e784afa6576db2876a86df1e9ec40bc1d1f7596 (diff) | |
parent | a9ee98e0705946e582ae937f287ef4f00205e76e (diff) | |
download | nextcloud-server-fda6ffc866cf8c5d3579fe95d1731ab747894002.tar.gz nextcloud-server-fda6ffc866cf8c5d3579fe95d1731ab747894002.zip |
Merge pull request #23780 from nextcloud/enh/ci/php8
PHP8 CI
Diffstat (limited to 'apps/dav/tests')
3 files changed, 12 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php index 55938c72e2d..887f48a1d04 100644 --- a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php @@ -38,6 +38,9 @@ use OCP\Calendar\Resource\IResource; use OCP\Calendar\Room\IManager as IRoomManager; use Test\TestCase; +interface tmpI extends IResource, IMetadataProvider { +} + class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { /** @var UpdateCalendarResourcesRoomsBackgroundJob */ @@ -108,9 +111,9 @@ class UpdateCalendarResourcesRoomsBackgroundJobTest extends TestCase { $backend3 = $this->createMock(IBackend::class); $backend4 = $this->createMock(IBackend::class); - $res6 = $this->createMock([IResource::class, IMetadataProvider::class]); - $res7 = $this->createMock([IResource::class, IMetadataProvider::class]); - $res8 = $this->createMock([IResource::class, IMetadataProvider::class]); + $res6 = $this->createMock(tmpI::class); + $res7 = $this->createMock(tmpI::class); + $res8 = $this->createMock(tmpI::class); $res9 = $this->createMock(IResource::class); $backend2->method('getBackendIdentifier') diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php index 3718f1bde46..b4f5d7dea9e 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php @@ -63,6 +63,9 @@ class NotifierTest extends TestCase { $this->l10n->expects($this->any()) ->method('t') ->willReturnCallback(function ($string, $args) { + if (!is_array($args)) { + $args = [$args]; + } return vsprintf($string, $args); }); $this->l10n->expects($this->any()) @@ -103,7 +106,7 @@ class NotifierTest extends TestCase { $this->assertEquals($this->notifier->getName(), 'Calendar'); } - + public function testPrepareWrongApp(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Notification not from this app'); @@ -120,7 +123,7 @@ class NotifierTest extends TestCase { $this->notifier->prepare($notification, 'en'); } - + public function testPrepareWrongSubject() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Unknown subject'); diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php index 026a722785d..73443eacb7c 100644 --- a/apps/dav/tests/unit/Command/MoveCalendarTest.php +++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php @@ -216,7 +216,7 @@ class MoveCalendarTest extends TestCase { 'destinationuid' => 'user2', ]); - $this->assertContains("[OK] Calendar <personal> was moved from user <user> to <user2>", $commandTester->getDisplay()); + $this->assertStringContainsString("[OK] Calendar <personal> was moved from user <user> to <user2>", $commandTester->getDisplay()); } public function dataTestMoveWithDestinationNotPartOfGroup(): array { |