summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CardDAV/CardDavBackendTest.php')
-rw-r--r--apps/dav/tests/unit/CardDAV/CardDavBackendTest.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
index fdcc0ad0c09..adf64ef82b0 100644
--- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php
@@ -181,7 +181,7 @@ class CardDavBackendTest extends TestCase {
}
}
- public function testAddressBookOperations() {
+ public function testAddressBookOperations(): void {
// create a new address book
$this->backend->createAddressBook(self::UNIT_TEST_USER, 'Example', []);
@@ -209,7 +209,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals(0, count($books));
}
- public function testAddressBookSharing() {
+ public function testAddressBookSharing(): void {
$this->userManager->expects($this->any())
->method('userExists')
->willReturn(true);
@@ -240,7 +240,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals(0, count($books));
}
- public function testCardOperations() {
+ public function testCardOperations(): void {
/** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $backend */
$backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
@@ -296,7 +296,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals(0, count($cards));
}
- public function testMultiCard() {
+ public function testMultiCard(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->setMethods(['updateProperties'])->getMock();
@@ -349,7 +349,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals(0, count($cards));
}
- public function testMultipleUIDOnDifferentAddressbooks() {
+ public function testMultipleUIDOnDifferentAddressbooks(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->onlyMethods(['updateProperties'])->getMock();
@@ -371,7 +371,7 @@ class CardDavBackendTest extends TestCase {
$this->backend->createCard($bookId1, $uri1, $this->vcardTest0);
}
- public function testMultipleUIDDenied() {
+ public function testMultipleUIDDenied(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->setMethods(['updateProperties'])->getMock();
@@ -392,7 +392,7 @@ class CardDavBackendTest extends TestCase {
$test = $this->backend->createCard($bookId, $uri1, $this->vcardTest0);
}
- public function testNoValidUID() {
+ public function testNoValidUID(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->setMethods(['updateProperties'])->getMock();
@@ -409,7 +409,7 @@ class CardDavBackendTest extends TestCase {
$test = $this->backend->createCard($bookId, $uri1, $this->vcardTestNoUID);
}
- public function testDeleteWithoutCard() {
+ public function testDeleteWithoutCard(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->onlyMethods([
@@ -449,7 +449,7 @@ class CardDavBackendTest extends TestCase {
$this->assertTrue($this->backend->deleteCard($bookId, $uri));
}
- public function testSyncSupport() {
+ public function testSyncSupport(): void {
$this->backend = $this->getMockBuilder(CardDavBackend::class)
->setConstructorArgs([$this->db, $this->principal, $this->userManager, $this->groupManager, $this->dispatcher])
->setMethods(['updateProperties'])->getMock();
@@ -473,7 +473,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals($uri0, $changes['added'][0]);
}
- public function testSharing() {
+ public function testSharing(): void {
$this->userManager->expects($this->any())
->method('userExists')
->willReturn(true);
@@ -511,7 +511,7 @@ class CardDavBackendTest extends TestCase {
$this->assertEquals(0, count($books));
}
- public function testUpdateProperties() {
+ public function testUpdateProperties(): void {
$bookId = 42;
$cardUri = 'card-uri';
$cardId = 2;
@@ -569,7 +569,7 @@ class CardDavBackendTest extends TestCase {
$this->assertSame($cardId, (int)$result[0]['cardid']);
}
- public function testPurgeProperties() {
+ public function testPurgeProperties(): void {
$query = $this->db->getQueryBuilder();
$query->insert('cards_properties')
->values(
@@ -611,7 +611,7 @@ class CardDavBackendTest extends TestCase {
$this->assertSame(2, (int)$result[0]['cardid']);
}
- public function testGetCardId() {
+ public function testGetCardId(): void {
$query = $this->db->getQueryBuilder();
$query->insert('cards')
@@ -633,7 +633,7 @@ class CardDavBackendTest extends TestCase {
}
- public function testGetCardIdFailed() {
+ public function testGetCardIdFailed(): void {
$this->expectException(\InvalidArgumentException::class);
$this->invokePrivate($this->backend, 'getCardId', [1, 'uri']);
@@ -647,7 +647,7 @@ class CardDavBackendTest extends TestCase {
* @param array $options
* @param array $expected
*/
- public function testSearch($pattern, $properties, $options, $expected) {
+ public function testSearch($pattern, $properties, $options, $expected): void {
/** @var VCard $vCards */
$vCards = [];
$vCards[0] = new VCard();
@@ -767,7 +767,7 @@ class CardDavBackendTest extends TestCase {
];
}
- public function testGetCardUri() {
+ public function testGetCardUri(): void {
$query = $this->db->getQueryBuilder();
$query->insert($this->dbCardsTable)
->values(
@@ -788,13 +788,13 @@ class CardDavBackendTest extends TestCase {
}
- public function testGetCardUriFailed() {
+ public function testGetCardUriFailed(): void {
$this->expectException(\InvalidArgumentException::class);
$this->backend->getCardUri(1);
}
- public function testGetContact() {
+ public function testGetContact(): void {
$query = $this->db->getQueryBuilder();
for ($i = 0; $i < 2; $i++) {
$query->insert($this->dbCardsTable)
@@ -825,11 +825,11 @@ class CardDavBackendTest extends TestCase {
$this->assertEmpty($result);
}
- public function testGetContactFail() {
+ public function testGetContactFail(): void {
$this->assertEmpty($this->backend->getContact(0, 'uri'));
}
- public function testCollectCardProperties() {
+ public function testCollectCardProperties(): void {
$query = $this->db->getQueryBuilder();
$query->insert($this->dbCardsPropertiesTable)
->values(