fix ContactsStoreTest

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2017-04-24 20:54:33 +02:00
parent 897bd5cfef
commit f32fc97533
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
1 changed files with 10 additions and 5 deletions

View File

@ -161,10 +161,11 @@ class ContactsStoreTest extends TestCase {
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
->with($this->equalTo(''), $this->equalTo(['FN']))
->with($this->equalTo('a567'), $this->equalTo(['UID']))
->willReturn([
[
'UID' => 123,
'isLocalSystemBook' => false
],
[
'UID' => 'a567',
@ -190,17 +191,19 @@ class ContactsStoreTest extends TestCase {
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
->with($this->equalTo(''), $this->equalTo(['FN']))
->with($this->equalTo('darren@roner.au'), $this->equalTo(['EMAIL']))
->willReturn([
[
'UID' => 123,
'isLocalSystemBook' => false
],
[
'UID' => 'a567',
'FN' => 'Darren Roner',
'EMAIL' => [
'darren@roner.au'
]
],
'isLocalSystemBook' => false
],
]);
$user->expects($this->once())
@ -226,17 +229,19 @@ class ContactsStoreTest extends TestCase {
$user = $this->createMock(IUser::class);
$this->contactsManager->expects($this->once())
->method('search')
->with($this->equalTo(''), $this->equalTo(['FN']))
->with($this->equalTo('a567'), $this->equalTo(['UID']))
->willReturn([
[
'UID' => 123,
'isLocalSystemBook' => false
],
[
'UID' => 'a567',
'FN' => 'Darren Roner',
'EMAIL' => [
'darren@roner.au123'
]
],
'isLocalSystemBook' => false
],
]);
$user->expects($this->once())