summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-04-21 09:35:01 +0200
committerGitHub <noreply@github.com>2017-04-21 09:35:01 +0200
commite9b00f84b85e97283b83cf951f9bd262e627ae9a (patch)
treebcc89a56e67397461a1afd54e0836315fd06e08a /apps/files_sharing
parentc4bd01456b7fc8e531af1e8cc37dbff4f1ca8578 (diff)
parent73b6cd1061480078ec252c1e5e1d97ac48ea892a (diff)
downloadnextcloud-server-e9b00f84b85e97283b83cf951f9bd262e627ae9a.tar.gz
nextcloud-server-e9b00f84b85e97283b83cf951f9bd262e627ae9a.zip
Merge pull request #4406 from nextcloud/fix-unit-test-problems
Fix unit test problems
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/Controller/ShareAPIControllerTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
index 6dfa8ec6c77..f5df9b62b19 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -39,6 +39,7 @@ use OCP\Lock\LockedException;
use OCP\Share\IManager;
use OCP\Share;
use Test\TestCase;
+use OCP\Share\IShare;
/**
* Class ShareAPIControllerTest
@@ -549,18 +550,18 @@ class ShareAPIControllerTest extends TestCase {
]));
$this->assertTrue($this->invokePrivate($this->ocs, 'canAccessShare', [$share]));
- $share = $this->getMockBuilder('OCP\Share\IShare')->getMock();
+ $share = $this->createMock(IShare::class);
$share->method('getShareType')->willReturn(\OCP\Share::SHARE_TYPE_GROUP);
$share->method('getSharedWith')->willReturn('group2');
$this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share]));
// null group
- $share = $this->getMock('OCP\Share\IShare');
+ $share = $this->createMock(IShare::class);
$share->method('getShareType')->willReturn(\OCP\Share::SHARE_TYPE_GROUP);
$share->method('getSharedWith')->willReturn('groupnull');
$this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share]));
- $share = $this->getMockBuilder('OCP\Share\IShare')->getMock();
+ $share = $this->createMock(IShare::class);
$share->method('getShareType')->willReturn(\OCP\Share::SHARE_TYPE_LINK);
$this->assertFalse($this->invokePrivate($this->ocs, 'canAccessShare', [$share]));
}