Fix getMock files_trashbin

pull/1242/head
Roeland Jago Douma 9 years ago committed by Morris Jobke
parent 9cd6374878
commit 327352e73a
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
  1. 6
      apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
  2. 2
      apps/files_trashbin/tests/TrashbinTest.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);

@ -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…
Cancel
Save