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
861c897e
Unverified
Commit
861c897e
authored
5 years ago
by
Robin Appelman
Committed by
Roeland Jago Douma
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix tests
Signed-off-by:
Robin Appelman
<
robin@icewind.nl
>
parent
15a21ee1
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/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
+2
-57
2 additions, 57 deletions
...ests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
with
2 additions
and
57 deletions
apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
+
2
−
57
View file @
861c897e
...
...
@@ -144,16 +144,6 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
* Test that propFind on a missing file soft fails
*/
public
function
testPropFindMissingFileSoftFail
()
{
$this
->
tree
->
expects
(
$this
->
at
(
0
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
throwException
(
new
\Sabre\DAV\Exception\NotFound
()));
$this
->
tree
->
expects
(
$this
->
at
(
1
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
throwException
(
new
\Sabre\DAV\Exception\ServiceUnavailable
()));
$propFind
=
new
\Sabre\DAV\PropFind
(
'/dummypath'
,
array
(
...
...
@@ -174,20 +164,14 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
$propFind
);
//
no exception, soft fail
$this
->
a
ddToAssertionCount
(
1
);
//
assert that the above didn't throw exceptions
$this
->
a
ssertTrue
(
true
);
}
/**
* Test setting/getting properties
*/
public
function
testSetGetPropertiesForFile
()
{
$node
=
$this
->
createTestNode
(
File
::
class
);
$this
->
tree
->
expects
(
$this
->
any
())
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
returnValue
(
$node
));
$this
->
applyDefaultProps
();
$propFind
=
new
\Sabre\DAV\PropFind
(
...
...
@@ -214,39 +198,6 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
* Test getting properties from directory
*/
public
function
testGetPropertiesForDirectory
()
{
$rootNode
=
$this
->
createTestNode
(
Directory
::
class
);
$nodeSub
=
$this
->
getMockBuilder
(
File
::
class
)
->
disableOriginalConstructor
()
->
getMock
();
$nodeSub
->
expects
(
$this
->
any
())
->
method
(
'getId'
)
->
will
(
$this
->
returnValue
(
456
));
$nodeSub
->
expects
(
$this
->
any
())
->
method
(
'getPath'
)
->
will
(
$this
->
returnValue
(
'/dummypath/test.txt'
));
$this
->
tree
->
expects
(
$this
->
at
(
0
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
returnValue
(
$rootNode
));
$this
->
tree
->
expects
(
$this
->
at
(
1
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath/test.txt'
)
->
will
(
$this
->
returnValue
(
$nodeSub
));
$this
->
tree
->
expects
(
$this
->
at
(
2
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
returnValue
(
$rootNode
));
$this
->
tree
->
expects
(
$this
->
at
(
3
))
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath/test.txt'
)
->
will
(
$this
->
returnValue
(
$nodeSub
));
$this
->
applyDefaultProps
(
'/dummypath'
);
$this
->
applyDefaultProps
(
'/dummypath/test.txt'
);
...
...
@@ -294,12 +245,6 @@ class CustomPropertiesBackendTest extends \Test\TestCase {
* Test delete property
*/
public
function
testDeleteProperty
()
{
$node
=
$this
->
createTestNode
(
File
::
class
);
$this
->
tree
->
expects
(
$this
->
any
())
->
method
(
'getNodeForPath'
)
->
with
(
'/dummypath'
)
->
will
(
$this
->
returnValue
(
$node
));
$this
->
applyDefaultProps
();
$propPatch
=
new
\Sabre\DAV\PropPatch
(
array
(
...
...
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