summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-10-11 17:25:21 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-10-22 14:13:37 +0200
commit8722458d2a2342517e45674129ec5c7d071a4077 (patch)
tree31535d9b58e9fb24f9ad4c915e0601bdaf1f0ef4 /apps/files_sharing/tests
parent8f0a9ae51fdc92e7c33f7a48b9d84da6c6b196e1 (diff)
downloadnextcloud-server-8722458d2a2342517e45674129ec5c7d071a4077.tar.gz
nextcloud-server-8722458d2a2342517e45674129ec5c7d071a4077.zip
ensure that sorting is stable
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php
index edcc9b9ae3a..42487e61622 100644
--- a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php
+++ b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php
@@ -74,7 +74,7 @@ class ShareRecipientSorterTest extends TestCase {
$workArray = $data['input'];
$this->sorter->sort($workArray, $data['context']);
- $this->assertSame($data['expected'], $workArray);
+ $this->assertEquals($data['expected'], $workArray);
}
public function testSortNoNodes() {
@@ -98,7 +98,7 @@ class ShareRecipientSorterTest extends TestCase {
public function sortDataProvider() {
return [[
[
- #1 – sort properly and otherwise keep existing order
+ #0 – sort properly and otherwise keep existing order
'context' => ['itemType' => 'files', 'itemId' => 42],
'accessList' => ['users' => ['celia', 'darius', 'faruk', 'gail'], 'bots' => ['r2-d2']],
'input' => [
@@ -135,7 +135,7 @@ class ShareRecipientSorterTest extends TestCase {
],
],
[
- # 2 – no recipients
+ #1 – no recipients
'context' => ['itemType' => 'files', 'itemId' => 42],
'accessList' => ['users' => false],
'input' => [
@@ -172,7 +172,7 @@ class ShareRecipientSorterTest extends TestCase {
],
],
[
- #3 – unsupported item type
+ #2 – unsupported item type
'context' => ['itemType' => 'announcements', 'itemId' => 42],
'accessList' => null, // not needed
'input' => [
@@ -209,7 +209,7 @@ class ShareRecipientSorterTest extends TestCase {
],
],
[
- #4 – no nothing
+ #3 – no nothing
'context' => ['itemType' => 'files', 'itemId' => 42],
'accessList' => [],
'input' => [],