mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Fix BackgroundJob list tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
679682c186
commit
75fca38e66
1 changed files with 6 additions and 1 deletions
|
|
@ -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…
Reference in a new issue