summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-12-08 17:05:38 +0100
committerGitHub <noreply@github.com>2020-12-08 17:05:38 +0100
commit86a3b7e7bf419e2bf1acc687625d0ff8596d39dc (patch)
treee467d21a31f7e78320ee9739ba66dccd4025eb65 /apps/dav/tests
parentfda6ffc866cf8c5d3579fe95d1731ab747894002 (diff)
parent13a438b3224f3f42a0f552230f680a243e1af705 (diff)
downloadnextcloud-server-86a3b7e7bf419e2bf1acc687625d0ff8596d39dc.tar.gz
nextcloud-server-86a3b7e7bf419e2bf1acc687625d0ff8596d39dc.zip
Merge pull request #24486 from nextcloud/feature/noid/phone-number-validation
Phone number validation and search
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CardDAV/ConverterTest.php17
-rw-r--r--apps/dav/tests/unit/CardDAV/SyncServiceTest.php15
2 files changed, 17 insertions, 15 deletions
diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php
index 8b4125c6c68..aef5cf8ef1c 100644
--- a/apps/dav/tests/unit/CardDAV/ConverterTest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -29,13 +29,14 @@ namespace OCA\DAV\Tests\unit\CardDAV;
use OC\Accounts\AccountManager;
use OCA\DAV\CardDAV\Converter;
+use OCP\Accounts\IAccountManager;
use OCP\IImage;
use OCP\IUser;
use Test\TestCase;
class ConverterTest extends TestCase {
- /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */
+ /** @var AccountManager|\PHPUnit\Framework\MockObject\MockObject */
private $accountManager;
protected function setUp(): void {
@@ -49,36 +50,36 @@ class ConverterTest extends TestCase {
->disableOriginalConstructor()->getMock();
$accountManager->expects($this->any())->method('getUser')->willReturn(
[
- AccountManager::PROPERTY_DISPLAYNAME =>
+ IAccountManager::PROPERTY_DISPLAYNAME =>
[
'value' => $user->getDisplayName(),
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
],
- AccountManager::PROPERTY_ADDRESS =>
+ IAccountManager::PROPERTY_ADDRESS =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_WEBSITE =>
+ IAccountManager::PROPERTY_WEBSITE =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_EMAIL =>
+ IAccountManager::PROPERTY_EMAIL =>
[
'value' => $user->getEMailAddress(),
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
],
- AccountManager::PROPERTY_AVATAR =>
+ IAccountManager::PROPERTY_AVATAR =>
[
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY
],
- AccountManager::PROPERTY_PHONE =>
+ IAccountManager::PROPERTY_PHONE =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_TWITTER =>
+ IAccountManager::PROPERTY_TWITTER =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
index 0a474d649bc..eb8186807c6 100644
--- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
@@ -31,6 +31,7 @@ namespace OCA\DAV\Tests\unit\CardDAV;
use OC\Accounts\AccountManager;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\SyncService;
+use OCP\Accounts\IAccountManager;
use OCP\ILogger;
use OCP\IUser;
use OCP\IUserManager;
@@ -132,36 +133,36 @@ class SyncServiceTest extends TestCase {
$accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock();
$accountManager->expects($this->any())->method('getUser')
->willReturn([
- AccountManager::PROPERTY_DISPLAYNAME =>
+ IAccountManager::PROPERTY_DISPLAYNAME =>
[
'value' => $user->getDisplayName(),
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
],
- AccountManager::PROPERTY_ADDRESS =>
+ IAccountManager::PROPERTY_ADDRESS =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_WEBSITE =>
+ IAccountManager::PROPERTY_WEBSITE =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_EMAIL =>
+ IAccountManager::PROPERTY_EMAIL =>
[
'value' => $user->getEMailAddress(),
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY,
],
- AccountManager::PROPERTY_AVATAR =>
+ IAccountManager::PROPERTY_AVATAR =>
[
'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY
],
- AccountManager::PROPERTY_PHONE =>
+ IAccountManager::PROPERTY_PHONE =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,
],
- AccountManager::PROPERTY_TWITTER =>
+ IAccountManager::PROPERTY_TWITTER =>
[
'value' => '',
'scope' => AccountManager::VISIBILITY_PRIVATE,