summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-20 12:27:32 +0200
committerJoas Schilling <coding@schilljs.com>2017-04-20 12:30:21 +0200
commita0ada9aab40c83b242cfbda1ab6078938c14bea7 (patch)
treee4c60a2c25188cd3862f048b227a12797ea9043b /apps/files_sharing
parent24789ba0f4b6961adce71fca1dc58b847d1e5e22 (diff)
downloadnextcloud-server-a0ada9aab40c83b242cfbda1ab6078938c14bea7.tar.gz
nextcloud-server-a0ada9aab40c83b242cfbda1ab6078938c14bea7.zip
Don't use deprecated getMock() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
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]));
}