summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php32
1 files changed, 24 insertions, 8 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
index b2d4384133d..0c6446e2911 100644
--- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -56,17 +56,25 @@ class SharesPluginTest extends \Test\TestCase {
$this->tree = $this->getMockBuilder('\Sabre\DAV\Tree')
->disableOriginalConstructor()
->getMock();
- $this->shareManager = $this->getMock('\OCP\Share\IManager');
- $user = $this->getMock('\OCP\IUser');
+ $this->shareManager = $this->getMockBuilder('\OCP\Share\IManager')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $user = $this->getMockBuilder('\OCP\IUser')
+ ->disableOriginalConstructor()
+ ->getMock();
$user->expects($this->once())
->method('getUID')
->will($this->returnValue('user1'));
- $userSession = $this->getMock('\OCP\IUserSession');
+ $userSession = $this->getMockBuilder('\OCP\IUserSession')
+ ->disableOriginalConstructor()
+ ->getMock();
$userSession->expects($this->once())
->method('getUser')
->will($this->returnValue($user));
- $this->userFolder = $this->getMock('\OCP\Files\Folder');
+ $this->userFolder = $this->getMockBuilder('\OCP\Files\Folder')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->plugin = new \OCA\DAV\Connector\Sabre\SharesPlugin(
$this->tree,
@@ -92,7 +100,9 @@ class SharesPluginTest extends \Test\TestCase {
->will($this->returnValue('/subdir'));
// node API nodes
- $node = $this->getMock('\OCP\Files\Folder');
+ $node = $this->getMockBuilder('\OCP\Files\Folder')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->userFolder->expects($this->once())
->method('get')
@@ -168,15 +178,21 @@ class SharesPluginTest extends \Test\TestCase {
->will($this->returnValue('/subdir'));
// node API nodes
- $node = $this->getMock('\OCP\Files\Folder');
+ $node = $this->getMockBuilder('\OCP\Files\Folder')
+ ->disableOriginalConstructor()
+ ->getMock();
$node->expects($this->any())
->method('getId')
->will($this->returnValue(123));
- $node1 = $this->getMock('\OCP\Files\File');
+ $node1 = $this->getMockBuilder('\OCP\Files\File')
+ ->disableOriginalConstructor()
+ ->getMock();
$node1->expects($this->any())
->method('getId')
->will($this->returnValue(111));
- $node2 = $this->getMock('\OCP\Files\File');
+ $node2 = $this->getMockBuilder('\OCP\Files\File')
+ ->disableOriginalConstructor()
+ ->getMock();
$node2->expects($this->any())
->method('getId')
->will($this->returnValue(222));