summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-10 21:59:39 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-10 21:59:39 +0200
commitf9683aaf3d23d02cccdd65843bfd6c01f2e2bdad (patch)
tree9dc12bec6e1266029a096e2aa8c34b3ab7e40af9 /apps/dav
parent4d09e2453e20e451e1cec9c6a91eeed40543d3cc (diff)
parent2c77bfa0d087cfdd6512264301b457ca9e9745c1 (diff)
downloadnextcloud-server-f9683aaf3d23d02cccdd65843bfd6c01f2e2bdad.tar.gz
nextcloud-server-f9683aaf3d23d02cccdd65843bfd6c01f2e2bdad.zip
Merge pull request #23863 from owncloud/fix_unit_tests
Fix unit tests warnings
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/tests/unit/comments/commentsplugin.php10
-rw-r--r--apps/dav/tests/unit/connector/sabre/filesplugin.php10
2 files changed, 4 insertions, 16 deletions
diff --git a/apps/dav/tests/unit/comments/commentsplugin.php b/apps/dav/tests/unit/comments/commentsplugin.php
index c7d073d1491..c909f6a61ab 100644
--- a/apps/dav/tests/unit/comments/commentsplugin.php
+++ b/apps/dav/tests/unit/comments/commentsplugin.php
@@ -449,16 +449,6 @@ class CommentsPlugin extends \Test\TestCase {
->with('users', 'alice', 'files', '42')
->will($this->returnValue($comment));
- $this->commentsManager->expects($this->any())
- ->method('setMessage')
- ->with('')
- ->will($this->throwException(new \InvalidArgumentException()));
-
- $this->commentsManager->expects($this->any())
- ->method('setVerb')
- ->with('')
- ->will($this->throwException(new \InvalidArgumentException()));
-
$this->userSession->expects($this->once())
->method('getUser')
->will($this->returnValue($user));
diff --git a/apps/dav/tests/unit/connector/sabre/filesplugin.php b/apps/dav/tests/unit/connector/sabre/filesplugin.php
index e88066a12da..fb08ee170c4 100644
--- a/apps/dav/tests/unit/connector/sabre/filesplugin.php
+++ b/apps/dav/tests/unit/connector/sabre/filesplugin.php
@@ -84,6 +84,7 @@ class FilesPlugin extends \Test\TestCase {
$node = $this->getMockBuilder($class)
->disableOriginalConstructor()
->getMock();
+
$node->expects($this->any())
->method('getId')
->will($this->returnValue(123));
@@ -164,7 +165,9 @@ class FilesPlugin extends \Test\TestCase {
}
public function testGetPropertiesForFileHome() {
- $node = $this->createTestNode('\OCA\DAV\Files\FilesHome');
+ $node = $this->getMockBuilder('\OCA\DAV\Files\FilesHome')
+ ->disableOriginalConstructor()
+ ->getMock();
$propFind = new \Sabre\DAV\PropFind(
'/dummyPath',
@@ -185,9 +188,6 @@ class FilesPlugin extends \Test\TestCase {
->disableOriginalConstructor()->getMock();
$user->expects($this->never())->method('getUID');
$user->expects($this->never())->method('getDisplayName');
- $node->expects($this->never())->method('getDirectDownload');
- $node->expects($this->never())->method('getOwner');
- $node->expects($this->never())->method('getSize');
$this->plugin->handleGetProperties(
$propFind,
@@ -276,8 +276,6 @@ class FilesPlugin extends \Test\TestCase {
0
);
- $node->expects($this->never())
- ->method('getDirectDownload');
$node->expects($this->once())
->method('getSize')
->will($this->returnValue(1025));