Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
7ff7a49f
Commit
7ff7a49f
authored
Oct 17, 2014
by
Arthur Schiwon
Browse files
adjust group manager tests
parent
e16122f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/lib/group/manager.php
View file @
7ff7a49f
...
...
@@ -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
(
'
I
nGroup'
)
->
will
(
$this
->
returnCallback
(
function
(
$uid
,
$gid
)
{
$backend
->
expects
(
$this
->
any
())
->
method
(
'
i
nGroup'
)
->
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
)
);
}
}));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment