diff options
Diffstat (limited to 'tests/lib/BackgroundJob/DummyJobList.php')
-rw-r--r-- | tests/lib/BackgroundJob/DummyJobList.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/BackgroundJob/DummyJobList.php b/tests/lib/BackgroundJob/DummyJobList.php index be48259789a..42b69cfbe41 100644 --- a/tests/lib/BackgroundJob/DummyJobList.php +++ b/tests/lib/BackgroundJob/DummyJobList.php @@ -21,6 +21,11 @@ class DummyJobList extends \OC\BackgroundJob\JobList { */ private array $jobs = []; + /** + * @var bool[] + */ + private array $reserved = []; + private int $last = 0; public function __construct() { @@ -135,6 +140,14 @@ class DummyJobList extends \OC\BackgroundJob\JobList { $job->setLastRun(time()); } + public function hasReservedJob(?string $className = null): bool { + return $this->reserved[$className ?? '']; + } + + public function setHasReservedJob(?string $className, bool $hasReserved): void { + $this->reserved[$className ?? ''] = $hasReserved; + } + public function setExecutionTime(IJob $job, $timeTaken): void { } |