Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
594f5b6a
Commit
594f5b6a
authored
10 years ago
by
Joas Schilling
Browse files
Options
Downloads
Patches
Plain Diff
Add visibility to test methods
parent
fb0fef78
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_sharing/tests/share.php
+11
-11
11 additions, 11 deletions
apps/files_sharing/tests/share.php
with
11 additions
and
11 deletions
apps/files_sharing/tests/share.php
+
11
−
11
View file @
594f5b6a
...
...
@@ -65,7 +65,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
parent
::
tearDown
();
}
function
testUnshareFromSelf
()
{
public
function
testUnshareFromSelf
()
{
\OC_Group
::
createGroup
(
'testGroup'
);
\OC_Group
::
addToGroup
(
self
::
TEST_FILES_SHARING_API_USER2
,
'testGroup'
);
...
...
@@ -103,7 +103,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
/**
* if a file was shared as group share and as individual share they should be grouped
*/
function
testGroupingOfShares
()
{
public
function
testGroupingOfShares
()
{
$fileinfo
=
$this
->
view
->
getFileInfo
(
$this
->
filename
);
...
...
@@ -171,7 +171,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
* single user share to user2. If he re-shares the file to user2 the same target
* then the group share should be used to group the item
*/
function
testShareAndUnshareFromSelf
()
{
public
function
testShareAndUnshareFromSelf
()
{
$fileinfo
=
$this
->
view
->
getFileInfo
(
$this
->
filename
);
// share the file to group1 (user2 is a member of this group) and explicitely to user2
...
...
@@ -217,7 +217,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
}
function
verifyDirContent
(
$content
,
$expected
)
{
public
function
verifyDirContent
(
$content
,
$expected
)
{
foreach
(
$content
as
$c
)
{
if
(
!
in_array
(
$c
[
'name'
],
$expected
))
{
$this
->
assertTrue
(
false
,
"folder should only contain '"
.
implode
(
','
,
$expected
)
.
"', found: "
.
$c
[
'name'
]);
...
...
@@ -225,7 +225,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
}
}
function
testShareWithDifferentShareFolder
()
{
public
function
testShareWithDifferentShareFolder
()
{
$fileinfo
=
$this
->
view
->
getFileInfo
(
$this
->
filename
);
$folderinfo
=
$this
->
view
->
getFileInfo
(
$this
->
folder
);
...
...
@@ -249,7 +249,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
\OC
::
$server
->
getConfig
()
->
deleteSystemValue
(
'share_folder'
);
}
function
testShareWithGroupUniqueName
()
{
public
function
testShareWithGroupUniqueName
()
{
$this
->
loginHelper
(
self
::
TEST_FILES_SHARING_API_USER1
);
\OC\Files\Filesystem
::
file_put_contents
(
'test.txt'
,
'test'
);
...
...
@@ -283,9 +283,9 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
/**
* shared files should never have delete permissions
* @dataProvider
D
ataProviderTestFileSharePermissions
* @dataProvider
d
ataProviderTestFileSharePermissions
*/
function
testFileSharePermissions
(
$permission
,
$expectedPermissions
)
{
public
function
testFileSharePermissions
(
$permission
,
$expectedPermissions
)
{
$fileinfo
=
$this
->
view
->
getFileInfo
(
$this
->
filename
);
...
...
@@ -305,7 +305,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
$this
->
assertSame
(
$expectedPermissions
,
$share
[
'permissions'
]);
}
function
D
ataProviderTestFileSharePermissions
()
{
public
function
d
ataProviderTestFileSharePermissions
()
{
$permission1
=
\OCP\Constants
::
PERMISSION_ALL
;
$permission3
=
\OCP\Constants
::
PERMISSION_READ
;
$permission4
=
\OCP\Constants
::
PERMISSION_READ
|
\OCP\Constants
::
PERMISSION_UPDATE
;
...
...
@@ -329,7 +329,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
* @param bool $includePaths whether to include paths in the result
* @param array $expectedResult expected result of the API call
*/
function
testGetUsersSharingFile
(
$groupName
,
$includeOwner
,
$includePaths
,
$expectedResult
)
{
public
function
testGetUsersSharingFile
(
$groupName
,
$includeOwner
,
$includePaths
,
$expectedResult
)
{
$fileinfo
=
$this
->
view
->
getFileInfo
(
$this
->
folder
);
...
...
@@ -368,7 +368,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
);
}
function
dataProviderGetUsersSharingFile
()
{
public
function
dataProviderGetUsersSharingFile
()
{
// note: "group" contains user1 (the owner), user2 and user3
// and self::TEST_FILES_SHARING_API_GROUP1 contains only user2
return
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment