diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-27 09:14:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-27 09:22:33 +0100 |
commit | db17598a0e99a1dc8b789fc9523667fe905eb9ef (patch) | |
tree | 89214de48586311ecd4ede28ac2b2f08774dc9a9 /apps/dav/tests/unit/connector/sabre/filesplugin.php | |
parent | 0875a4a18fcdbc40fa856f469c0de77b8fcaf539 (diff) | |
download | nextcloud-server-db17598a0e99a1dc8b789fc9523667fe905eb9ef.tar.gz nextcloud-server-db17598a0e99a1dc8b789fc9523667fe905eb9ef.zip |
Verify the src exists in webdav MOVE
* Unit test added
Diffstat (limited to 'apps/dav/tests/unit/connector/sabre/filesplugin.php')
-rw-r--r-- | apps/dav/tests/unit/connector/sabre/filesplugin.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/connector/sabre/filesplugin.php b/apps/dav/tests/unit/connector/sabre/filesplugin.php index a91ca7a4ff7..db3bbabefd0 100644 --- a/apps/dav/tests/unit/connector/sabre/filesplugin.php +++ b/apps/dav/tests/unit/connector/sabre/filesplugin.php @@ -251,4 +251,17 @@ class FilesPlugin extends \Test\TestCase { $this->plugin->checkMove('FolderA/test.txt', 'test.txt'); } + + /** + * @expectedException \Sabre\DAV\Exception\NotFound + * @expectedExceptionMessage FolderA/test.txt does not exist + */ + public function testMoveSrcNotExist() { + $this->view->expects($this->once()) + ->method('getFileInfo') + ->with('FolderA/test.txt') + ->willReturn(false); + + $this->plugin->checkMove('FolderA/test.txt', 'test.txt'); + } } |