diff options
Diffstat (limited to 'apps/dav/tests/unit/connector/sabre/objecttree.php')
-rw-r--r-- | apps/dav/tests/unit/connector/sabre/objecttree.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/objecttree.php b/apps/dav/tests/unit/connector/sabre/objecttree.php index e5e858ef17b..5b0dcae21b5 100644 --- a/apps/dav/tests/unit/connector/sabre/objecttree.php +++ b/apps/dav/tests/unit/connector/sabre/objecttree.php @@ -56,6 +56,11 @@ class TestDoubleFileView extends \OC\Files\View { public function getRelativePath($path) { return $path; } + + public function getFileInfo($path, $includeMountPoints = true) { + $objectTreeTest = new ObjectTreeTest(); + return $objectTreeTest->getFileInfoMock(); + } } /** @@ -67,6 +72,21 @@ class TestDoubleFileView extends \OC\Files\View { */ class ObjectTree extends \Test\TestCase { + public function getFileInfoMock() { + $mock = $this->getMock('\OCP\Files\FileInfo'); + $mock + ->expects($this->any()) + ->method('isDeletable') + ->willReturn(true); + $mock + ->expects($this->any()) + ->method('isUpdateable') + ->willReturn(true); + + return $mock; + } + + /** * @dataProvider moveFailedProvider * @expectedException \Sabre\DAV\Exception\Forbidden |