0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-18 12:11:41 +00:00
nextcloud_server/tests/lib/Command/CronBusTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
643 B
PHP
Raw Normal View History

<?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;
class CronBusTest extends AsyncBusTest {
/**
* @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);
}
}
}