summaryrefslogtreecommitdiffstats
path: root/tests/lib/User/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/User/ManagerTest.php')
-rw-r--r--tests/lib/User/ManagerTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php
index 0d98a9825de..ac54d27d324 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -185,6 +185,9 @@ class ManagerTest extends TestCase {
->method('userExists')
->with($this->equalTo('foo'))
->will($this->returnValue(true));
+ $backend->expects($this->once())
+ ->method('loginName2UserName')
+ ->willReturn(false);
$manager = new \OC\User\Manager($this->config);
$manager->registerBackend($backend);
@@ -236,6 +239,9 @@ class ManagerTest extends TestCase {
->method('getUsers')
->with($this->equalTo('fo'), $this->equalTo(3), $this->equalTo(1))
->will($this->returnValue(array('foo1', 'foo2')));
+ $backend1->expects($this->exactly(2))
+ ->method('loginName2UserName')
+ ->willReturn(false);
/**
* @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2
@@ -245,6 +251,9 @@ class ManagerTest extends TestCase {
->method('getUsers')
->with($this->equalTo('fo'), $this->equalTo(3), $this->equalTo(1))
->will($this->returnValue(array('foo3')));
+ $backend2->expects($this->once())
+ ->method('loginName2UserName')
+ ->willReturn(false);
$manager = new \OC\User\Manager($this->config);
$manager->registerBackend($backend1);
@@ -324,6 +333,9 @@ class ManagerTest extends TestCase {
->method('userExists')
->with($this->equalTo('foo'))
->will($this->returnValue(false));
+ $backend->expects($this->once())
+ ->method('loginName2UserName')
+ ->willReturn(false);
$manager = new \OC\User\Manager($this->config);
$manager->registerBackend($backend);