summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CardDAV/SyncServiceTest.php')
-rw-r--r--apps/dav/tests/unit/CardDAV/SyncServiceTest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
index 62225dc2938..e6a5ac1f16a 100644
--- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
@@ -68,7 +68,7 @@ class SyncServiceTest extends TestCase {
public function testEnsureSystemAddressBookExists() {
/** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backend */
- $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDAVBackend')->disableOriginalConstructor()->getMock();
+ $backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$backend->expects($this->exactly(1))->method('createAddressBook');
$backend->expects($this->at(0))->method('getAddressBooksByUri')->willReturn(null);
$backend->expects($this->at(1))->method('getAddressBooksByUri')->willReturn([]);
@@ -82,7 +82,7 @@ class SyncServiceTest extends TestCase {
public function testUpdateAndDeleteUser() {
/** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backend */
- $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDAVBackend')->disableOriginalConstructor()->getMock();
+ $backend = $this->getMockBuilder(CardDavBackend::class)->disableOriginalConstructor()->getMock();
$logger = $this->getMockBuilder('OCP\ILogger')->disableOriginalConstructor()->getMock();
$backend->expects($this->once())->method('createCard');
@@ -118,7 +118,9 @@ class SyncServiceTest extends TestCase {
* @return \PHPUnit_Framework_MockObject_MockObject
*/
private function getBackendMock($createCount, $updateCount, $deleteCount) {
- $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDAVBackend')->disableOriginalConstructor()->getMock();
+ $backend = $this->getMockBuilder(CardDavBackend::class)
+ ->disableOriginalConstructor()
+ ->getMock();
$backend->expects($this->exactly($createCount))->method('createCard');
$backend->expects($this->exactly($updateCount))->method('updateCard');
$backend->expects($this->exactly($deleteCount))->method('deleteCard');
@@ -134,7 +136,7 @@ class SyncServiceTest extends TestCase {
$userManager = $this->getMockBuilder('OCP\IUserManager')->disableOriginalConstructor()->getMock();
$logger = $this->getMockBuilder('OCP\ILogger')->disableOriginalConstructor()->getMock();
/** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $ss */
- $ss = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService')
+ $ss = $this->getMockBuilder(SyncService::class)
->setMethods(['ensureSystemAddressBookExists', 'requestSyncReport', 'download'])
->setConstructorArgs([$backend, $userManager, $logger])
->getMock();