Fix BackgroundJob list tests

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/36073/head
Côme Chilliet 4 years ago
parent 679682c186
commit 75fca38e66
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 7
      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();

Loading…
Cancel
Save