summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-06-21 13:55:11 +0200
committerGitHub <noreply@github.com>2016-06-21 13:55:11 +0200
commitf2f1eab7f4ade9abb77f70c6a5c3244b5c6153f4 (patch)
tree1a4a086aae79f9da1ba28c94299ffb2c8eaeb5b2
parentaf98e3e641220db4ddf38a9270f535603526f6c5 (diff)
downloadnextcloud-server-f2f1eab7f4ade9abb77f70c6a5c3244b5c6153f4.tar.gz
nextcloud-server-f2f1eab7f4ade9abb77f70c6a5c3244b5c6153f4.zip
fix broken unit test (#25198)
-rw-r--r--apps/files_sharing/tests/MountProviderTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php
index 993d3654891..f69098cde7b 100644
--- a/apps/files_sharing/tests/MountProviderTest.php
+++ b/apps/files_sharing/tests/MountProviderTest.php
@@ -24,6 +24,7 @@ namespace OCA\Files_Sharing\Tests;
use OCA\Files_Sharing\MountProvider;
use OCP\Files\Storage\IStorageFactory;
use OCP\IConfig;
+use OCP\ILogger;
use OCP\IUser;
use OCP\Share\IShare;
use OCP\Share\IManager;
@@ -46,6 +47,9 @@ class MountProviderTest extends \Test\TestCase {
/** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
private $shareManager;
+ /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */
+ private $logger;
+
public function setUp() {
parent::setUp();
@@ -53,11 +57,13 @@ class MountProviderTest extends \Test\TestCase {
$this->user = $this->getMock('OCP\IUser');
$this->loader = $this->getMock('OCP\Files\Storage\IStorageFactory');
$this->shareManager = $this->getMock('\OCP\Share\IManager');
+ $this->logger = $this->getMock('\OCP\ILogger');
- $this->provider = new MountProvider($this->config, $this->shareManager);
+ $this->provider = new MountProvider($this->config, $this->shareManager, $this->logger);
}
public function testExcludeShares() {
+ /** @var IShare | \PHPUnit_Framework_MockObject_MockObject $share1 */
$share1 = $this->getMock('\OCP\Share\IShare');
$share1->expects($this->once())
->method('getPermissions')
@@ -79,6 +85,7 @@ class MountProviderTest extends \Test\TestCase {
->method('getPermissions')
->will($this->returnValue(0));
+ /** @var IShare | \PHPUnit_Framework_MockObject_MockObject $share4 */
$share4 = $this->getMock('\OCP\Share\IShare');
$share4->expects($this->once())
->method('getPermissions')