From 31532ecf131f7e598fe1d8bd80b9ea3b48fd0577 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 12 Sep 2016 21:32:11 +0200 Subject: [PATCH] Fix getMock ViewTest --- tests/lib/Files/ViewTest.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 72a9161410..b0233116ed 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -12,8 +12,10 @@ use OC\Files\Cache\Watcher; use OC\Files\Storage\Common; use OC\Files\Mount\MountPoint; use OC\Files\Storage\Temporary; +use OCP\Files\Config\IMountProvider; use OCP\Files\FileInfo; use OCP\Lock\ILockingProvider; +use Test\TestMoveableMountPoint; class TemporaryNoTouch extends \OC\Files\Storage\Temporary { public function touch($path, $mtime = null) { @@ -1529,14 +1531,13 @@ class ViewTest extends \Test\TestCase { ->setMethods([]) ->getMock(); - $mounts[] = $this->getMock( - '\Test\TestMoveableMountPoint', - ['moveMount'], - [$storage, $mountPoint] - ); + $mounts[] = $this->getMockBuilder(TestMoveableMountPoint::class) + ->setMethods(['moveMount']) + ->setConstructorArgs([$storage, $mountPoint]) + ->getMock(); } - $mountProvider = $this->getMock('\OCP\Files\Config\IMountProvider'); + $mountProvider = $this->createMock(IMountProvider::class); $mountProvider->expects($this->any()) ->method('getMountsForUser') ->will($this->returnValue($mounts));