mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
test: adjust tests to unsorted share listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
52f62effa8
commit
d098916b95
1 changed files with 3 additions and 0 deletions
|
|
@ -660,6 +660,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$share->method('getId')->willReturn($id);
|
||||
|
||||
$children = $this->provider->getChildren($share);
|
||||
usort($children, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
|
||||
|
||||
$this->assertCount(2, $children);
|
||||
|
||||
|
|
@ -2640,6 +2641,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->assertSame(IShare::TYPE_USER, $file_shares[0]->getShareType());
|
||||
|
||||
$folder_shares = $result[$folder2->getId()];
|
||||
usort($folder_shares, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
|
||||
$this->assertCount(2, $folder_shares);
|
||||
$this->assertSame($folder2->getId(), $folder_shares[0]->getNodeId());
|
||||
$this->assertSame($folder2->getId(), $folder_shares[1]->getNodeId());
|
||||
|
|
@ -3100,6 +3102,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
->willReturn(1);
|
||||
|
||||
$shares = $this->provider->getSharesByPath($node);
|
||||
usort($shares, fn (IShare $a, IShare $b) => $a->getId() <=> $b->getId());
|
||||
$this->assertCount(3, $shares);
|
||||
|
||||
$this->assertEquals($id1, $shares[0]->getId());
|
||||
|
|
|
|||
Loading…
Reference in a new issue