diff options
Diffstat (limited to 'tests/lib/BackgroundJob/JobListTest.php')
-rw-r--r-- | tests/lib/BackgroundJob/JobListTest.php | 7 |
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(); |