Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
f935a385
Commit
f935a385
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
add some comments
parent
5b4f515e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_sharing/tests/api.php
+3
-2
3 additions, 2 deletions
apps/files_sharing/tests/api.php
with
3 additions
and
2 deletions
apps/files_sharing/tests/api.php
+
3
−
2
View file @
f935a385
...
@@ -226,6 +226,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
...
@@ -226,6 +226,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
// share was successful?
// share was successful?
$this
->
assertTrue
(
$result
);
$this
->
assertTrue
(
$result
);
// get item to determine share ID
$result
=
\OCP\Share
::
getItemShared
(
'file'
,
$fileInfo
[
'fileid'
]);
$result
=
\OCP\Share
::
getItemShared
(
'file'
,
$fileInfo
[
'fileid'
]);
$this
->
assertEquals
(
count
(
$result
),
1
);
$this
->
assertEquals
(
count
(
$result
),
1
);
...
@@ -233,13 +234,13 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
...
@@ -233,13 +234,13 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
// get first element
// get first element
$share
=
reset
(
$result
);
$share
=
reset
(
$result
);
// call getShare() with share ID
$params
=
array
(
'id'
=>
$share
[
'id'
]);
$params
=
array
(
'id'
=>
$share
[
'id'
]);
$result
=
Share\Api
::
getShare
(
$params
);
$result
=
Share\Api
::
getShare
(
$params
);
$this
->
assertTrue
(
$result
->
succeeded
());
$this
->
assertTrue
(
$result
->
succeeded
());
// test should return one share
created from testCreateShare()
// test should return one share
$this
->
assertEquals
(
count
(
$result
->
getData
()),
1
);
$this
->
assertEquals
(
count
(
$result
->
getData
()),
1
);
\OCP\Share
::
unshare
(
'file'
,
$fileInfo
[
'fileid'
],
\OCP\Share
::
SHARE_TYPE_USER
,
\OCP\Share
::
unshare
(
'file'
,
$fileInfo
[
'fileid'
],
\OCP\Share
::
SHARE_TYPE_USER
,
...
...
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