aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/BackgroundJob
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-12 11:40:18 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-12 11:40:18 +0100
commit75fca38e665681f3ef4e87b41a1910e47ba6c90e (patch)
treeace8c8a2b6e72561852654c76f4436881ab67847 /tests/lib/BackgroundJob
parent679682c186ee99c98fe795721b5e620e03d96d6b (diff)
downloadnextcloud-server-75fca38e665681f3ef4e87b41a1910e47ba6c90e.tar.gz
nextcloud-server-75fca38e665681f3ef4e87b41a1910e47ba6c90e.zip
Fix BackgroundJob list tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/BackgroundJob')
-rw-r--r--tests/lib/BackgroundJob/JobListTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php
index 736d670ed20..62f04509068 100644
--- a/tests/lib/BackgroundJob/JobListTest.php
+++ b/tests/lib/BackgroundJob/JobListTest.php
@@ -54,7 +54,12 @@ class JobListTest extends TestCase {
}
protected function getAllSorted() {
- $jobs = $this->instance->getAll();
+ $iterator = $this->instance->getJobs(null, null, 0);
+ $jobs = [];
+
+ foreach ($iterator as $job) {
+ $jobs[] = clone $job;
+ }
usort($jobs, function (IJob $job1, IJob $job2) {
return $job1->getId() - $job2->getId();