diff options
author | Robin Appelman <robin@icewind.nl> | 2016-11-10 15:06:24 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-10 15:06:24 +0100 |
commit | ec2235e14b54d39af751edb816afe13e1f1ee70b (patch) | |
tree | bcf728cbde74081923da3a8c82e356de5638fe0c /apps/dav/tests | |
parent | d1291f7aeee53e78cffc19fa376c75084ca277a5 (diff) | |
download | nextcloud-server-ec2235e14b54d39af751edb816afe13e1f1ee70b.tar.gz nextcloud-server-ec2235e14b54d39af751edb816afe13e1f1ee70b.zip |
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index 2e17c7d0b38..9d8a66f24b6 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -97,7 +97,7 @@ class SharesPluginTest extends \Test\TestCase { $sabreNode->expects($this->any()) ->method('getId') ->will($this->returnValue(123)); - $sabreNode->expects($this->once()) + $sabreNode->expects($this->any()) ->method('getPath') ->will($this->returnValue('/subdir')); @@ -155,7 +155,7 @@ class SharesPluginTest extends \Test\TestCase { $sabreNode1->expects($this->any()) ->method('getId') ->will($this->returnValue(111)); - $sabreNode1->expects($this->never()) + $sabreNode1->expects($this->any()) ->method('getPath'); $sabreNode2 = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\File') ->disableOriginalConstructor() @@ -163,8 +163,9 @@ class SharesPluginTest extends \Test\TestCase { $sabreNode2->expects($this->any()) ->method('getId') ->will($this->returnValue(222)); - $sabreNode2->expects($this->never()) - ->method('getPath'); + $sabreNode2->expects($this->any()) + ->method('getPath') + ->will($this->returnValue('/subdir/foo')); $sabreNode = $this->getMockBuilder('\OCA\DAV\Connector\Sabre\Directory') ->disableOriginalConstructor() @@ -198,9 +199,6 @@ class SharesPluginTest extends \Test\TestCase { $node2->expects($this->any()) ->method('getId') ->will($this->returnValue(222)); - $node->expects($this->once()) - ->method('getDirectoryListing') - ->will($this->returnValue([$node1, $node2])); $this->userFolder->expects($this->once()) ->method('get') @@ -208,7 +206,7 @@ class SharesPluginTest extends \Test\TestCase { ->will($this->returnValue($node)); $dummyShares = array_map(function($type) { - $share = $this->getMock('\OCP\Share\IShare'); + $share = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share->expects($this->any()) ->method('getShareType') ->will($this->returnValue($type)); |