mirror of
https://github.com/nextcloud/server.git
synced 2026-03-19 09:05:01 -04:00
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> # Conflicts: # apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
39 lines
669 B
PHP
39 lines
669 B
PHP
<?php
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace Test\Command;
|
|
|
|
use OC\Command\CronBus;
|
|
use Test\BackgroundJob\DummyJobList;
|
|
|
|
/**
|
|
* @group DB
|
|
*/
|
|
class CronBusTest extends AsyncBusTestCase {
|
|
/**
|
|
* @var \OCP\BackgroundJob\IJobList
|
|
*/
|
|
private $jobList;
|
|
|
|
|
|
protected function setUp(): void {
|
|
parent::setUp();
|
|
|
|
$this->jobList = new DummyJobList();
|
|
}
|
|
|
|
protected function createBus() {
|
|
return new CronBus($this->jobList);
|
|
}
|
|
|
|
protected function runJobs() {
|
|
$jobs = $this->jobList->getAll();
|
|
foreach ($jobs as $job) {
|
|
$job->start($this->jobList);
|
|
}
|
|
}
|
|
}
|