Skip to content

Commit d098916

Browse files
icewind1991backportbot[bot]
authored andcommitted
test: adjust tests to unsorted share listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 52f62ef commit d098916

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/lib/Share20/DefaultShareProviderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ public function testGetChildren(): void {
660660
$share->method('getId')->willReturn($id);
661661

662662
$children = $this->provider->getChildren($share);
663+
usort($children, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
663664

664665
$this->assertCount(2, $children);
665666

@@ -2640,6 +2641,7 @@ public function testGetSharesInFolder(): void {
26402641
$this->assertSame(IShare::TYPE_USER, $file_shares[0]->getShareType());
26412642

26422643
$folder_shares = $result[$folder2->getId()];
2644+
usort($folder_shares, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
26432645
$this->assertCount(2, $folder_shares);
26442646
$this->assertSame($folder2->getId(), $folder_shares[0]->getNodeId());
26452647
$this->assertSame($folder2->getId(), $folder_shares[1]->getNodeId());
@@ -3100,6 +3102,7 @@ public function testGetSharesByPath(): void {
31003102
->willReturn(1);
31013103

31023104
$shares = $this->provider->getSharesByPath($node);
3105+
usort($shares, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
31033106
$this->assertCount(3, $shares);
31043107

31053108
$this->assertEquals($id1, $shares[0]->getId());

0 commit comments

Comments
 (0)