]> source.dussan.org Git - nextcloud-server.git/commitdiff
adjust group manager tests
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 17 Oct 2014 18:53:09 +0000 (20:53 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 17 Oct 2014 18:53:09 +0000 (20:53 +0200)
tests/lib/group/manager.php

index e4b3a5227678ddc1ea34f03003477c3a0814261b..8fd19513c0a66831fa87e9ce28396c74822ec089 100644 (file)
@@ -369,15 +369,6 @@ class Manager extends \PHPUnit_Framework_TestCase {
                                 }
                         }));
 
-               $backend->expects($this->once())
-                       ->method('implementsActions')
-                       ->will($this->returnValue(true));
-
-               $backend->expects($this->once())
-                       ->method('countUsersInGroup')
-                       ->with('testgroup', '')
-                       ->will($this->returnValue(2));
-
                /**
                 * @var \OC\User\Manager $userManager
                 */
@@ -496,9 +487,9 @@ class Manager extends \PHPUnit_Framework_TestCase {
                        ->with('testgroup')
                        ->will($this->returnValue(true));
 
-                $backend->expects($this->any())
-                       ->method('InGroup')
-                       ->will($this->returnCallback(function($uid, $gid) {
+        $backend->expects($this->any())
+                       ->method('inGroup')
+                       ->will($this->returnCallback(function($uid) {
                                 switch($uid) {
                                         case 'user1' : return false;
                                         case 'user2' : return true;
@@ -521,9 +512,12 @@ class Manager extends \PHPUnit_Framework_TestCase {
                        ->with('user3')
                        ->will($this->returnCallback(function($search, $limit, $offset) use ($userBackend) {
                                 switch($offset) {
-                                        case 0 : return array('user3' => new User('user3', $userBackend),
-                                                        'user33' => new User('user33', $userBackend));
-                                        case 2 : return array('user333' => new User('user333', $userBackend));
+                                        case 0 :
+                                                                                       return array(
+                                                                                               'user3' => new User('user3', $userBackend),
+                                                'user33' => new User('user33', $userBackend),
+                                                                                               'user333' => new User('user333', $userBackend)
+                                                                                       );
                                 }
                         }));