nextcloud/tests/lib/Command/CronBusTest.php
Ferdinand Thiessen e5b1799079
chore: add missing Override attribute to test files
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:28 +02:00

41 lines
748 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 OCP\BackgroundJob\IJobList;
use Test\BackgroundJob\DummyJobList;
#[\PHPUnit\Framework\Attributes\Group('DB')]
class CronBusTest extends AsyncBusTestCase {
/**
* @var IJobList
*/
private $jobList;
#[\Override]
protected function setUp(): void {
parent::setUp();
$this->jobList = new DummyJobList();
}
#[\Override]
protected function createBus() {
return new CronBus($this->jobList);
}
#[\Override]
protected function runJobs() {
$jobs = $this->jobList->getAll();
foreach ($jobs as $job) {
$job->start($this->jobList);
}
}
}