[Pkg-owncloud-commits] [owncloud] 21/32: adjust user manager tests

David Prévot taffit at moszumanska.debian.org
Wed Apr 23 18:59:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit af45da94b363f3989e9d579b877e0a4245dbdd42
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Sat Mar 15 06:41:46 2014 +0100

    adjust user manager tests
---
 tests/lib/user/manager.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/lib/user/manager.php b/tests/lib/user/manager.php
index 8ca0f94..fd0931a 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() {
@@ -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() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list