diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-07-18 12:15:34 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-07-18 12:15:34 +0200 |
commit | e3ea3ed3c563fce2b5fe1addfe199e3aaec7abdb (patch) | |
tree | 52fc58e3b1a46b1045223e869e83a7c104e97f21 /tests/lib/group | |
parent | 63df8f350084c2e90419419e425697da8eff8a27 (diff) | |
download | nextcloud-server-e3ea3ed3c563fce2b5fe1addfe199e3aaec7abdb.tar.gz nextcloud-server-e3ea3ed3c563fce2b5fe1addfe199e3aaec7abdb.zip |
group: only pass backends that hold that specific group to the group constructor
Diffstat (limited to 'tests/lib/group')
-rw-r--r-- | tests/lib/group/group.php | 4 | ||||
-rw-r--r-- | tests/lib/group/manager.php | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/lib/group/group.php b/tests/lib/group/group.php index 116aefda81c..75e975d9e65 100644 --- a/tests/lib/group/group.php +++ b/tests/lib/group/group.php @@ -307,10 +307,6 @@ class Group extends \PHPUnit_Framework_TestCase { $backend->expects($this->once()) ->method('deleteGroup') ->with('group1'); - $backend->expects($this->once()) - ->method('groupExists') - ->with('group1') - ->will($this->returnValue(true)); $backend->expects($this->any()) ->method('implementsActions') ->will($this->returnValue(true)); diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php index 2ecaefc1406..9d3adf51a0c 100644 --- a/tests/lib/group/manager.php +++ b/tests/lib/group/manager.php @@ -17,7 +17,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend */ $backend = $this->getMock('\OC_Group_Database'); - $backend->expects($this->once()) + $backend->expects($this->any()) ->method('groupExists') ->with('group1') ->will($this->returnValue(true)); @@ -85,7 +85,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend1 */ $backend1 = $this->getMock('\OC_Group_Database'); - $backend1->expects($this->once()) + $backend1->expects($this->any()) ->method('groupExists') ->with('group1') ->will($this->returnValue(false)); @@ -94,7 +94,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend2 */ $backend2 = $this->getMock('\OC_Group_Database'); - $backend2->expects($this->once()) + $backend2->expects($this->any()) ->method('groupExists') ->with('group1') ->will($this->returnValue(true)); @@ -117,7 +117,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend */ $backend = $this->getMock('\OC_Group_Database'); - $backend->expects($this->once()) + $backend->expects($this->any()) ->method('groupExists') ->with('group1') ->will($this->returnValue(false)); @@ -143,7 +143,7 @@ class Manager extends \PHPUnit_Framework_TestCase { * @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend */ $backend = $this->getMock('\OC_Group_Database'); - $backend->expects($this->once()) + $backend->expects($this->any()) ->method('groupExists') ->with('group1') ->will($this->returnValue(true)); |