aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2025-02-28 17:17:15 +0100
committerDaniel <mail@danielkesselberg.de>2025-03-06 18:40:30 +0100
commitec664b0aea5efc72bfe13e449bbafafab8daa53e (patch)
tree80f83db70cb620d44d56a136e048de45c761e437 /apps/dav/tests
parentb44f1568f2dc97c746281d99e2342ad679e3d8a9 (diff)
downloadnextcloud-server-fix/dav/create-sab-install.tar.gz
nextcloud-server-fix/dav/create-sab-install.zip
fix(dav): Create SAB at installationfix/dav/create-sab-install
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Migration/CreateSystemAddressBookStepTest.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/Migration/CreateSystemAddressBookStepTest.php b/apps/dav/tests/unit/Migration/CreateSystemAddressBookStepTest.php
new file mode 100644
index 00000000000..bbecd0607b4
--- /dev/null
+++ b/apps/dav/tests/unit/Migration/CreateSystemAddressBookStepTest.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\DAV\Tests\Unit\Migration;
+
+use OCA\DAV\CardDAV\SyncService;
+use OCA\DAV\Migration\CreateSystemAddressBookStep;
+use OCP\Migration\IOutput;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+
+class CreateSystemAddressBookStepTest extends TestCase {
+
+ private SyncService|MockObject $syncService;
+ private CreateSystemAddressBookStep $step;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->syncService = $this->createMock(SyncService::class);
+
+ $this->step = new CreateSystemAddressBookStep(
+ $this->syncService,
+ );
+ }
+
+ public function testGetName(): void {
+ $name = $this->step->getName();
+
+ self::assertEquals('Create system address book', $name);
+ }
+
+ public function testRun(): void {
+ $output = $this->createMock(IOutput::class);
+
+ $this->step->run($output);
+
+ $this->addToAssertionCount(1);
+ }
+
+}