aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
blob: 168e21c3a918ad4bacd6ee4825c7f6865e098542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

declare(strict_types=1);
/**
 * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking;

use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend;

class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTestCase {
	protected function setUp(): void {
		parent::setUp();

		$this->principalBackend = new ResourcePrincipalBackend(self::$realDatabase,
			$this->userSession, $this->groupManager, $this->logger, $this->proxyMapper);

		$this->mainDbTable = 'calendar_resources';
		$this->metadataDbTable = 'calendar_resources_md';
		$this->foreignKey = 'resource_id';

		$this->principalPrefix = 'principals/calendar-resources';
		$this->expectedCUType = 'RESOURCE';

		$this->createTestDatasetInDb();
	}
}