aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-23 18:23:52 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-02-07 11:23:32 +0100
commitd315bce30041b8521db1433ea115a021b261ebf6 (patch)
treed9ea982e89f2057c9864d54a1c515d0d1792a3ff /apps/files/tests
parent110fc79918c5c843dbd51373cb4f78f5f19697c3 (diff)
downloadnextcloud-server-d315bce30041b8521db1433ea115a021b261ebf6.tar.gz
nextcloud-server-d315bce30041b8521db1433ea115a021b261ebf6.zip
Improve behavior with dates on 32bits and fix tests or skip them
We do not support events after 2038 on 32bits but still behave better when date range start/end is after 2038. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/HelperTest.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/tests/HelperTest.php b/apps/files/tests/HelperTest.php
index 230e2c6cea2..afb2b51f7e1 100644
--- a/apps/files/tests/HelperTest.php
+++ b/apps/files/tests/HelperTest.php
@@ -93,7 +93,10 @@ class HelperTest extends \Test\TestCase {
/**
* @dataProvider sortDataProvider
*/
- public function testSortByName($sort, $sortDescending, $expectedOrder) {
+ public function testSortByName(string $sort, bool $sortDescending, array $expectedOrder) {
+ if (($sort === 'mtime') && (PHP_INT_SIZE < 8)) {
+ $this->skip('Skip mtime sorting on 32bit');
+ }
$files = self::getTestFileList();
$files = \OCA\Files\Helper::sortFiles($files, $sort, $sortDescending);
$fileNames = [];