From 75fca38e665681f3ef4e87b41a1910e47ba6c90e Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 12 Jan 2023 11:40:18 +0100 Subject: Fix BackgroundJob list tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/lib/BackgroundJob/JobListTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/lib/BackgroundJob') 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(); -- cgit v1.2.3