mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
test: adjust tests to unsorted share listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d470ad108f
commit
d307557c56
1 changed files with 3 additions and 0 deletions
|
|
@ -662,6 +662,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);
|
||||
|
||||
|
|
@ -2642,6 +2643,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());
|
||||
|
|
@ -3102,6 +3104,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