diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-29 10:03:20 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-29 10:03:20 +0100 |
commit | ede1cbf61245a269be5e2bb8fb27bcaa6b44f1a9 (patch) | |
tree | 23e49f5bd0f1eac4fff04efaf807d7858b01a9d6 /apps/dav/tests | |
parent | 24908a439a8b17929af57f122bc931e4deaefd01 (diff) | |
parent | a5c528ff7e9bf6b7a9a35a8274b9e03a52153615 (diff) | |
download | nextcloud-server-ede1cbf61245a269be5e2bb8fb27bcaa6b44f1a9.tar.gz nextcloud-server-ede1cbf61245a269be5e2bb8fb27bcaa6b44f1a9.zip |
Merge pull request #21932 from owncloud/comments-dav-refinements
provide info about plugin, and do not run commit ourselves on proppatch
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/comments/commentnode.php | 3 | ||||
-rw-r--r-- | apps/dav/tests/unit/comments/commentsplugin.php | 25 |
2 files changed, 22 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/comments/commentnode.php b/apps/dav/tests/unit/comments/commentnode.php index e1498459ce8..aa75e35d665 100644 --- a/apps/dav/tests/unit/comments/commentnode.php +++ b/apps/dav/tests/unit/comments/commentnode.php @@ -114,9 +114,6 @@ class CommentsNode extends \Test\TestCase { ->method('handle') ->with('{http://owncloud.org/ns}message'); - $propPatch->expects($this->once()) - ->method('commit'); - $this->node->propPatch($propPatch); } diff --git a/apps/dav/tests/unit/comments/commentsplugin.php b/apps/dav/tests/unit/comments/commentsplugin.php index 391c79d156a..bd0b56fc650 100644 --- a/apps/dav/tests/unit/comments/commentsplugin.php +++ b/apps/dav/tests/unit/comments/commentsplugin.php @@ -517,7 +517,26 @@ class CommentsPlugin extends \Test\TestCase { ->will($this->returnValue($path)); $this->plugin->initialize($this->server); - $this->plugin->onReport('', [], '/' . $path); + $this->plugin->onReport(CommentsPluginImplementation::REPORT_NAME, [], '/' . $path); + } + + /** + * @expectedException \Sabre\DAV\Exception\ReportNotSupported + */ + public function testOnReportInvalidReportName() { + $path = 'comments/files/42'; + + $this->tree->expects($this->any()) + ->method('getNodeForPath') + ->with('/' . $path) + ->will($this->returnValue($this->getMock('\Sabre\DAV\INode'))); + + $this->server->expects($this->any()) + ->method('getRequestUri') + ->will($this->returnValue($path)); + $this->plugin->initialize($this->server); + + $this->plugin->onReport('{whoever}whatever', [], '/' . $path); } public function testOnReportDateTimeEmpty() { @@ -572,7 +591,7 @@ class CommentsPlugin extends \Test\TestCase { $this->server->httpResponse = $response; $this->plugin->initialize($this->server); - $this->plugin->onReport('', $parameters, '/' . $path); + $this->plugin->onReport(CommentsPluginImplementation::REPORT_NAME, $parameters, '/' . $path); } public function testOnReport() { @@ -627,7 +646,7 @@ class CommentsPlugin extends \Test\TestCase { $this->server->httpResponse = $response; $this->plugin->initialize($this->server); - $this->plugin->onReport('', $parameters, '/' . $path); + $this->plugin->onReport(CommentsPluginImplementation::REPORT_NAME, $parameters, '/' . $path); } |