summaryrefslogtreecommitdiffstats
path: root/tests/lib/user/manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/user/manager.php')
-rw-r--r--tests/lib/user/manager.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/user/manager.php b/tests/lib/user/manager.php
index ad1ac9e12f2..fd0931af7e4 100644
--- a/tests/lib/user/manager.php
+++ b/tests/lib/user/manager.php
@@ -190,8 +190,8 @@ class Manager extends \PHPUnit_Framework_TestCase {
$result = $manager->search('fo');
$this->assertEquals(2, count($result));
- $this->assertEquals('afoo', $result[0]->getUID());
- $this->assertEquals('foo', $result[1]->getUID());
+ $this->assertEquals('afoo', array_shift($result)->getUID());
+ $this->assertEquals('foo', array_shift($result)->getUID());
}
public function testSearchTwoBackendLimitOffset() {
@@ -210,7 +210,7 @@ class Manager extends \PHPUnit_Framework_TestCase {
$backend2 = $this->getMock('\OC_User_Dummy');
$backend2->expects($this->once())
->method('getUsers')
- ->with($this->equalTo('fo'), $this->equalTo(1), $this->equalTo(0))
+ ->with($this->equalTo('fo'), $this->equalTo(3), $this->equalTo(1))
->will($this->returnValue(array('foo3')));
$manager = new \OC\User\Manager();
@@ -219,9 +219,9 @@ class Manager extends \PHPUnit_Framework_TestCase {
$result = $manager->search('fo', 3, 1);
$this->assertEquals(3, count($result));
- $this->assertEquals('foo1', $result[0]->getUID());
- $this->assertEquals('foo2', $result[1]->getUID());
- $this->assertEquals('foo3', $result[2]->getUID());
+ $this->assertEquals('foo1', array_shift($result)->getUID());
+ $this->assertEquals('foo2', array_shift($result)->getUID());
+ $this->assertEquals('foo3', array_shift($result)->getUID());
}
public function testCreateUserSingleBackendNotExists() {