Fix unit tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-04-20 16:01:26 -05:00
parent 088f4422f9
commit 5d18e4243d
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,7 @@ class AddressBookTest extends TestCase {
]);
$calendarInfo = [
'{http://owncloud.org/ns}owner-principal' => 'user1',
'{DAV:}displayname' => 'Test address book',
'principaluri' => 'user2',
'id' => 666,
'uri' => 'default',
@ -61,6 +62,7 @@ class AddressBookTest extends TestCase {
]);
$calendarInfo = [
'{http://owncloud.org/ns}owner-principal' => 'user1',
'{DAV:}displayname' => 'Test address book',
'principaluri' => 'user2',
'id' => 666,
'uri' => 'default',
@ -78,6 +80,7 @@ class AddressBookTest extends TestCase {
$backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock();
$calendarInfo = [
'{http://owncloud.org/ns}owner-principal' => 'user1',
'{DAV:}displayname' => 'Test address book',
'principaluri' => 'user2',
'id' => 666,
'uri' => 'default',
@ -95,6 +98,7 @@ class AddressBookTest extends TestCase {
$backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock();
$backend->expects($this->any())->method('applyShareAcl')->willReturnArgument(1);
$calendarInfo = [
'{DAV:}displayname' => 'Test address book',
'principaluri' => 'user2',
'id' => 666,
'uri' => 'default'

View File

@ -39,7 +39,7 @@ class ContactsManagerTest extends TestCase {
/** @var CardDavBackend | \PHPUnit_Framework_MockObject_MockObject $backEnd */
$backEnd = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock();
$backEnd->method('getAddressBooksForUser')->willReturn([
['uri' => 'default'],
['{DAV:}displayname' => 'Test address book', 'uri' => 'default'],
]);
$l = $this->createMock(IL10N::class);