Skip to content
Snippets Groups Projects
Unverified Commit 31532ecf authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Fix getMock ViewTest

parent 5069b74f
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,10 @@ use OC\Files\Cache\Watcher; ...@@ -12,8 +12,10 @@ use OC\Files\Cache\Watcher;
use OC\Files\Storage\Common; use OC\Files\Storage\Common;
use OC\Files\Mount\MountPoint; use OC\Files\Mount\MountPoint;
use OC\Files\Storage\Temporary; use OC\Files\Storage\Temporary;
use OCP\Files\Config\IMountProvider;
use OCP\Files\FileInfo; use OCP\Files\FileInfo;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
use Test\TestMoveableMountPoint;
class TemporaryNoTouch extends \OC\Files\Storage\Temporary { class TemporaryNoTouch extends \OC\Files\Storage\Temporary {
public function touch($path, $mtime = null) { public function touch($path, $mtime = null) {
...@@ -1529,14 +1531,13 @@ class ViewTest extends \Test\TestCase { ...@@ -1529,14 +1531,13 @@ class ViewTest extends \Test\TestCase {
->setMethods([]) ->setMethods([])
->getMock(); ->getMock();
$mounts[] = $this->getMock( $mounts[] = $this->getMockBuilder(TestMoveableMountPoint::class)
'\Test\TestMoveableMountPoint', ->setMethods(['moveMount'])
['moveMount'], ->setConstructorArgs([$storage, $mountPoint])
[$storage, $mountPoint] ->getMock();
);
} }
$mountProvider = $this->getMock('\OCP\Files\Config\IMountProvider'); $mountProvider = $this->createMock(IMountProvider::class);
$mountProvider->expects($this->any()) $mountProvider->expects($this->any())
->method('getMountsForUser') ->method('getMountsForUser')
->will($this->returnValue($mounts)); ->will($this->returnValue($mounts));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment