diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-12 21:36:57 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-13 09:09:53 +0200 |
commit | 5aad530e6cd5cfb381862e27ddc7b10a2fe1e244 (patch) | |
tree | 15b2d1aac93966ec3d781f7a2a10d5ba5aa80571 /tests | |
parent | cd5183dccc3eb16a08a838d45e65a6e7f8e11dcb (diff) | |
download | nextcloud-server-5aad530e6cd5cfb381862e27ddc7b10a2fe1e244.tar.gz nextcloud-server-5aad530e6cd5cfb381862e27ddc7b10a2fe1e244.zip |
Fix getMock RepairUnmergedSharesTest
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Repair/RepairUnmergedSharesTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/Repair/RepairUnmergedSharesTest.php b/tests/lib/Repair/RepairUnmergedSharesTest.php index 7b9d2579389..2834cfe94b8 100644 --- a/tests/lib/Repair/RepairUnmergedSharesTest.php +++ b/tests/lib/Repair/RepairUnmergedSharesTest.php @@ -24,6 +24,7 @@ namespace Test\Repair; use OC\Repair\RepairUnmergedShares; use OC\Share\Constants; +use OCP\IUser; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; use Test\TestCase; @@ -69,8 +70,8 @@ class RepairUnmergedSharesTest extends TestCase { $this->connection = \OC::$server->getDatabaseConnection(); $this->deleteAllShares(); - $this->userManager = $this->getMock('\OCP\IUserManager'); - $this->groupManager = $this->getMock('\OCP\IGroupManager'); + $this->userManager = $this->createMock(IUserManager::class); + $this->groupManager = $this->createMock(IGroupManager::class); // used to generate incremental stimes $this->lastShareTime = time(); @@ -487,12 +488,12 @@ class RepairUnmergedSharesTest extends TestCase { * @dataProvider sharesDataProvider */ public function testMergeGroupShares($shares, $expectedShares) { - $user1 = $this->getMock('\OCP\IUser'); + $user1 = $this->createMock(IUser::class); $user1->expects($this->any()) ->method('getUID') ->will($this->returnValue('user1')); - $user2 = $this->getMock('\OCP\IUser'); + $user2 = $this->createMock(IUser::class); $user2->expects($this->any()) ->method('getUID') ->will($this->returnValue('user2')); |