From 327352e73a09f6a42335e7da14fb50583167c616 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 2 Sep 2016 10:42:06 +0200 Subject: [PATCH] Fix getMock files_trashbin --- apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php | 6 ++++-- apps/files_trashbin/tests/TrashbinTest.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php index d92984bbce9..4bf533194b4 100644 --- a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php +++ b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php @@ -24,15 +24,17 @@ namespace OCA\Files_Trashbin\Tests\BackgroundJob; use \OCA\Files_Trashbin\BackgroundJob\ExpireTrash; +use OCP\BackgroundJob\IJobList; +use OCP\IUserManager; class ExpireTrashTest extends \Test\TestCase { public function testConstructAndRun() { $backgroundJob = new ExpireTrash( - $this->getMock('OCP\IUserManager'), + $this->createMock(IUserManager::class), $this->getMockBuilder('OCA\Files_Trashbin\Expiration')->disableOriginalConstructor()->getMock() ); - $jobList = $this->getMock('\OCP\BackgroundJob\IJobList'); + $jobList = $this->createMock(IJobList::class); /** @var \OC\BackgroundJob\JobList $jobList */ $backgroundJob->execute($jobList); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index cb5a9fed5bb..7e4cdb112e8 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -112,7 +112,7 @@ class TrashbinTest extends \Test\TestCase { \OC::$server->getAppManager()->enableApp('files_trashbin'); $config = \OC::$server->getConfig(); - $mockConfig = $this->getMock('\OCP\IConfig'); + $mockConfig = $this->createMock(\OCP\IConfig::class); $mockConfig->expects($this->any()) ->method('getSystemValue') ->will($this->returnCallback(function ($key, $default) use ($config) { -- 2.39.5