18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
31 'normal file list' => [
32 [
'fileB',
'fileA',
'someFile'],
33 [
'fileA',
'fileB',
'someFile']
35 'already in correct order' => [
36 [
'fileA',
'fileB',
'someFile'],
37 [
'fileA',
'fileB',
'someFile']
40 [
'someFile',
'.hiddenFile'],
41 [
'.hiddenFile',
'someFile']
43 'mixed capitalization' => [
44 [
'alllower',
'allCAPS',
'ALLcaps',
'mIxedinanotherway',
'ALLCAPS',
'MiXeDcApItAlIzAtIoN'],
45 [
'ALLCAPS',
'ALLcaps',
'allCAPS',
'alllower',
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway']
47 'mixed capitalization reversed' => [
48 [
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway',
'ALLcaps',
'allCAPS',
'ALLCAPS',
'alllower'],
49 [
'ALLCAPS',
'ALLcaps',
'allCAPS',
'alllower',
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway']
51 'recursive list with one sublevel' => [
52 [
'fileA',
'fileB',
'anotherDir/someFile',
'someDir/someFile',
'anotherDir/anotherFile'],
53 [
'anotherDir/anotherFile',
'anotherDir/someFile',
'someDir/someFile',
'fileA',
'fileB']
55 'recursive list with two sub-levels' => [
56 [
'file',
'someDir/someFile',
'someDir/subdir/file',
'someDir/subdir/somefile',
'someDir/anotherDir/somefile',
'anotherDir/someFile'],
57 [
'anotherDir/someFile',
'someDir/anotherDir/somefile',
'someDir/subdir/file',
'someDir/subdir/somefile',
'someDir/someFile',
'file']
59 'recursive list with three sub-levels' => [
60 [
'someDir/someSubdir/file',
'someDir/someSubdir/someSubsubdir/someFile',
'someDir/someSubdir/someSubsubdir/anotherFile'],
61 [
'someDir/someSubdir/someSubsubdir/anotherFile',
'someDir/someSubdir/someSubsubdir/someFile',
'someDir/someSubdir/file']
74 $result = $unsortedList;
77 [ResourceUtility::class,
'recursiveFileListSortingHelper']
79 $this->assertSame($expectedList, $result);