diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-15 09:52:46 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-15 09:52:46 +0200 |
commit | 2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4 (patch) | |
tree | b43ce551bf0a4ea1bd78de7084d3814f35beb12f /apps/dav/tests/unit/Connector/Sabre/NodeTest.php | |
parent | 813b58ab947222f983fe25d56781f1f43c840538 (diff) | |
download | nextcloud-server-2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4.tar.gz nextcloud-server-2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4.zip |
Fix PHPUnit 5.4 warnings in DAV app
* getMock is deprecated
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/NodeTest.php')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/NodeTest.php | 16 |
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]); |