Skip to content

Commit 01c4da2

Browse files
committed
Merge branch '3.2' of github.com:fruux/sabre-dav into 3.2
2 parents 4d46256 + f0e99b2 commit 01c4da2

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

tests/Sabre/CardDAV/AddressBookHomeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function testGetChild404() {
9090
function testGetChildren() {
9191

9292
$children = $this->s->getChildren();
93-
$this->assertEquals(1, count($children));
93+
$this->assertEquals(2, count($children));
9494
$this->assertInstanceOf('Sabre\\CardDAV\\AddressBook', $children[0]);
9595
$this->assertEquals('book1', $children[0]->getName());
9696

@@ -109,7 +109,7 @@ function testCreateExtendedCollection() {
109109
'uri' => 'book2',
110110
'{DAV:}displayname' => 'a-book 2',
111111
'principaluri' => 'principals/user1',
112-
], $this->backend->addressBooks[1]);
112+
], $this->backend->addressBooks[2]);
113113

114114
}
115115

tests/Sabre/CardDAV/AddressBookTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function testCreateFile() {
8585
function testDelete() {
8686

8787
$this->ab->delete();
88-
$this->assertEquals([], $this->backend->addressBooks);
88+
$this->assertEquals(1, count($this->backend->addressBooks));
8989

9090
}
9191

tests/Sabre/CardDAV/Backend/Mock.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ function __construct($addressBooks = null, $cards = null) {
2020
'principaluri' => 'principals/user1',
2121
'{DAV:}displayname' => 'd-name',
2222
],
23+
[
24+
'id' => 'bar',
25+
'uri' => 'book3',
26+
'principaluri' => 'principals/user1',
27+
'{DAV:}displayname' => 'd-name',
28+
],
2329
];
2430

2531
$card2 = fopen('php://memory', 'r+');
@@ -30,6 +36,9 @@ function __construct($addressBooks = null, $cards = null) {
3036
'card1' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD",
3137
'card2' => $card2,
3238
],
39+
'bar' => [
40+
'card3' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD",
41+
],
3342
];
3443
}
3544

0 commit comments

Comments
 (0)