29 'normal file list' => array(
30 array(
'fileB',
'fileA',
'someFile'),
31 array(
'fileA',
'fileB',
'someFile')
33 'already in correct order' => array(
34 array(
'fileA',
'fileB',
'someFile'),
35 array(
'fileA',
'fileB',
'someFile')
37 'hidden file' => array(
38 array(
'someFile',
'.hiddenFile'),
39 array(
'.hiddenFile',
'someFile')
41 'mixed capitalization' => array(
42 array(
'alllower',
'allCAPS',
'ALLcaps',
'mIxedinanotherway',
'ALLCAPS',
'MiXeDcApItAlIzAtIoN'),
43 array(
'ALLCAPS',
'ALLcaps',
'allCAPS',
'alllower',
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway')
45 'mixed capitalization reversed' => array(
46 array(
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway',
'ALLcaps',
'allCAPS',
'ALLCAPS',
'alllower'),
47 array(
'ALLCAPS',
'ALLcaps',
'allCAPS',
'alllower',
'MiXeDcApItAlIzAtIoN',
'mIxedinanotherway')
49 'recursive list with one sublevel' => array(
50 array(
'fileA',
'fileB',
'anotherDir/someFile',
'someDir/someFile',
'anotherDir/anotherFile'),
51 array(
'anotherDir/anotherFile',
'anotherDir/someFile',
'someDir/someFile',
'fileA',
'fileB')
53 'recursive list with two sub-levels' => array(
54 array(
'file',
'someDir/someFile',
'someDir/subdir/file',
'someDir/subdir/somefile',
'someDir/anotherDir/somefile',
'anotherDir/someFile'),
55 array(
'anotherDir/someFile',
'someDir/anotherDir/somefile',
'someDir/subdir/file',
'someDir/subdir/somefile',
'someDir/someFile',
'file')
57 'recursive list with three sub-levels' => array(
58 array(
'someDir/someSubdir/file',
'someDir/someSubdir/someSubsubdir/someFile',
'someDir/someSubdir/someSubsubdir/anotherFile'),
59 array(
'someDir/someSubdir/someSubsubdir/anotherFile',
'someDir/someSubdir/someSubsubdir/someFile',
'someDir/someSubdir/file')
74 array(
'\\TYPO3\\CMS\\Core\\Utility\\ResourceUtility',
'recursiveFileListSortingHelper')
76 $this->assertSame($expectedList,
$result);
recursiveFileListSortingHelperCorrectlySorts($unsortedList, $expectedList)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
recursiveFileListSortingHelperTestDataProvider()