summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/NodeTest.php')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/NodeTest.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
index 3c7eb6f72c3..328e99c9fbe 100644
--- a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
@@ -66,7 +66,9 @@ class NodeTest extends \Test\TestCase {
$info->expects($this->any())
->method('getType')
->will($this->returnValue($type));
- $view = $this->getMock('\OC\Files\View');
+ $view = $this->getMockBuilder('\OC\Files\View')
+ ->disableOriginalConstructor()
+ ->getMock();
$node = new \OCA\DAV\Connector\Sabre\File($view, $info);
$this->assertEquals($expected, $node->getDavPermissions());
@@ -116,10 +118,14 @@ class NodeTest extends \Test\TestCase {
* @dataProvider sharePermissionsProvider
*/
public function testSharePermissions($type, $user, $permissions, $expected) {
- $storage = $this->getMock('\OCP\Files\Storage');
+ $storage = $this->getMockBuilder('\OCP\Files\Storage')
+ ->disableOriginalConstructor()
+ ->getMock();
$storage->method('getPermissions')->willReturn($permissions);
- $mountpoint = $this->getMock('\OCP\Files\Mount\IMountPoint');
+ $mountpoint = $this->getMockBuilder('\OCP\Files\Mount\IMountPoint')
+ ->disableOriginalConstructor()
+ ->getMock();
$mountpoint->method('getMountPoint')->willReturn('myPath');
$shareManager = $this->getMockBuilder('OCP\Share\IManager')->disableOriginalConstructor()->getMock();
$share = $this->getMockBuilder('OCP\Share\IShare')->disableOriginalConstructor()->getMock();
@@ -142,7 +148,9 @@ class NodeTest extends \Test\TestCase {
$info->method('getType')->willReturn($type);
$info->method('getMountPoint')->willReturn($mountpoint);
- $view = $this->getMock('\OC\Files\View');
+ $view = $this->getMockBuilder('\OC\Files\View')
+ ->disableOriginalConstructor()
+ ->getMock();
$node = new \OCA\DAV\Connector\Sabre\File($view, $info);
$this->invokePrivate($node, 'shareManager', [$shareManager]);