mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Fix getMock files_trashbin
This commit is contained in:
parent
9cd6374878
commit
327352e73a
2 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue