Test resource and room principal backend to check that they provide metadata

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2019-08-01 15:05:53 +02:00
parent 31d6138f46
commit 4b4292996f
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
3 changed files with 192 additions and 767 deletions

View File

@ -27,10 +27,16 @@ Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest {
public function setUp() {
parent::setUp();
$this->principalBackend = new ResourcePrincipalBackend($this->dbConnection,
$this->principalBackend = new ResourcePrincipalBackend(self::$realDatabase,
$this->userSession, $this->groupManager, $this->logger);
$this->expectedDbTable = 'calendar_resources';
$this->mainDbTable = 'calendar_resources';
$this->metadataDbTable = 'calendar_resources_md';
$this->foreignKey = 'resource_id';
$this->principalPrefix = 'principals/calendar-resources';
$this->expectedCUType = 'RESOURCE';
$this->createTestDatasetInDb();
}
}

View File

@ -27,10 +27,16 @@ Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest {
public function setUp() {
parent::setUp();
$this->principalBackend = new RoomPrincipalBackend($this->dbConnection,
$this->principalBackend = new RoomPrincipalBackend(self::$realDatabase,
$this->userSession, $this->groupManager, $this->logger);
$this->expectedDbTable = 'calendar_rooms';
$this->mainDbTable = 'calendar_rooms';
$this->metadataDbTable = 'calendar_rooms_md';
$this->foreignKey = 'room_id';
$this->principalPrefix = 'principals/calendar-rooms';
$this->expectedCUType = 'ROOM';
$this->createTestDatasetInDb();
}
}