Skip to content
GitLab
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
0f3fd89f
Commit
0f3fd89f
authored
Nov 06, 2014
by
Robin Appelman
Browse files
Fix sharing tests
parent
c21d1da0
Changes
3
Hide whitespace changes
Inline
Side-by-side
apps/files_sharing/tests/api.php
View file @
0f3fd89f
...
...
@@ -35,6 +35,9 @@ class Test_Files_Sharing_Api extends TestCase {
function
setUp
()
{
parent
::
setUp
();
\
OC
::
$server
->
getAppConfig
()
->
setValue
(
'core'
,
'shareapi_exclude_groups'
,
'no'
);
\
OC
::
$server
->
getAppConfig
()
->
setValue
(
'core'
,
'shareapi_expire_after_n_days'
,
'7'
);
$this
->
folder
=
self
::
TEST_FOLDER_NAME
;
$this
->
subfolder
=
'/subfolder_share_api_test'
;
$this
->
subsubfolder
=
'/subsubfolder_share_api_test'
;
...
...
apps/files_sharing/tests/sharedmount.php
View file @
0f3fd89f
...
...
@@ -226,6 +226,10 @@ class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase {
}
class
DummyTestClassSharedMount
extends
\
OCA\Files_Sharing\SharedMount
{
public
function
__construct
(
$storage
,
$mountpoint
,
$arguments
=
null
,
$loader
=
null
){
// noop
}
public
function
stripUserFilesPathDummy
(
$path
)
{
return
$this
->
stripUserFilesPath
(
$path
);
}
...
...
apps/files_sharing/tests/testcase.php
View file @
0f3fd89f
...
...
@@ -72,8 +72,14 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
$backend
->
createUser
(
self
::
TEST_FILES_SHARING_API_USER3
,
self
::
TEST_FILES_SHARING_API_USER3
);
// create group
\
OC_Group
::
createGroup
(
self
::
TEST_FILES_SHARING_API_GROUP1
);
\
OC_Group
::
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER2
,
self
::
TEST_FILES_SHARING_API_GROUP1
);
$groupBackend
=
new
\
OC_Group_Dummy
();
$groupBackend
->
createGroup
(
self
::
TEST_FILES_SHARING_API_GROUP1
);
$groupBackend
->
createGroup
(
'group'
);
$groupBackend
->
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER1
,
'group'
);
$groupBackend
->
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER2
,
'group'
);
$groupBackend
->
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER3
,
'group'
);
$groupBackend
->
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER2
,
self
::
TEST_FILES_SHARING_API_GROUP1
);
\
OC_Group
::
useBackend
(
$groupBackend
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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