Fix getMock files_trashbin

This commit is contained in:
Roeland Jago Douma 2016-09-02 10:42:06 +02:00 committed by Morris Jobke
parent 9cd6374878
commit 327352e73a
No known key found for this signature in database
GPG key ID: 9CE5ED29E7FCD38A
2 changed files with 5 additions and 3 deletions

View file

@ -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);

View file

@ -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) {