Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-10-24 16:26:53 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-10-24 18:45:32 +0300
commit43e498844e8c1aa519a19238d2cf3d6b95e1aab0 (patch)
tree59510ef2ffc6c1fd1fd92475013b108f1da2bfeb /tests/lib/SystemTag
parentb1f77aca4effec99387481a831910d4870ae2ffc (diff)
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/SystemTag')
-rw-r--r--tests/lib/SystemTag/SystemTagManagerTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php
index 61fac99ca6c..f81bbaf1643 100644
--- a/tests/lib/SystemTag/SystemTagManagerTest.php
+++ b/tests/lib/SystemTag/SystemTagManagerTest.php
@@ -13,6 +13,7 @@ namespace Test\SystemTag;
use OC\SystemTag\SystemTagManager;
use OC\SystemTag\SystemTagObjectMapper;
use OCP\IDBConnection;
+use OCP\IUser;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -56,7 +57,7 @@ class SystemTagManagerTest extends TestCase {
$this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')
->getMock();
- $this->groupManager = $this->getMockBuilder('\OCP\IGroupManager')->getMock();
+ $this->groupManager = $this->getMockBuilder(IGroupManager::class)->getMock();
$this->tagManager = new SystemTagManager(
$this->connection,
@@ -433,7 +434,7 @@ class SystemTagManagerTest extends TestCase {
* @dataProvider visibilityCheckProvider
*/
public function testVisibilityCheck($userVisible, $userAssignable, $isAdmin, $expectedResult) {
- $user = $this->getMockBuilder('\OCP\IUser')->getMock();
+ $user = $this->getMockBuilder(IUser::class)->getMock();
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('test'));
@@ -480,7 +481,7 @@ class SystemTagManagerTest extends TestCase {
* @dataProvider assignabilityCheckProvider
*/
public function testAssignabilityCheck($userVisible, $userAssignable, $isAdmin, $expectedResult, $userGroupIds = [], $tagGroupIds = []) {
- $user = $this->getMockBuilder('\OCP\IUser')->getMock();
+ $user = $this->getMockBuilder(IUser::class)->getMock();
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('test'));