[FOLLOWUP][BUGFIX] Allow longer file-endings in typoscript directory includes 65/54465/2
authorBenni Mack <benni@typo3.org>
Fri, 20 Oct 2017 14:10:52 +0000 (16:10 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 23 Oct 2017 12:58:35 +0000 (14:58 +0200)
Adds missing unit tests for this change.

Resolves: #82543
Releases: master, 8.7
Change-Id: Ica7f5c2f99dd991042e3c1166f7806534bf24421
Reviewed-on: https://review.typo3.org/54465
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 08ad677..af6d0e8 100644 (file)
@@ -3456,6 +3456,7 @@ class GeneralUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
                 'stuff.csv' => 'honey',
             ],
             'excludeMe.txt' => 'cocoa nibs',
+            'double.setup.typoscript' => 'cool TS',
             'testB.txt' => 'olive oil',
             'testA.txt' => 'eggs',
             'testC.txt' => 'carrots',
@@ -3510,16 +3511,16 @@ class GeneralUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     {
         return [
             'no space' => [
-                'txt,js,css'
+                'setup.typoscript,txt,js,css'
             ],
             'spaces' => [
-                'txt, js, css'
+                'setup.typoscript, txt, js, css'
             ],
             'mixed' => [
-                'txt,js, css'
+                'setup.typoscript , txt,js, css'
             ],
             'wild' => [
-                'txt,     js  ,         css'
+                'setup.typoscript,  txt,     js  ,         css'
             ]
         ];
     }
@@ -3532,6 +3533,7 @@ class GeneralUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     {
         $vfsStreamUrl = $this->getFilesInDirCreateTestDirectory();
         $files = GeneralUtility::getFilesInDir($vfsStreamUrl, $fileExtensions);
+        $this->assertContains('double.setup.typoscript', $files);
         $this->assertContains('testA.txt', $files);
         $this->assertContains('test.js', $files);
         $this->assertContains('test.css', $files);
@@ -3580,7 +3582,7 @@ class GeneralUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
         $vfsStreamUrl = $this->getFilesInDirCreateTestDirectory();
         $this->assertSame(
             array_values(GeneralUtility::getFilesInDir($vfsStreamUrl, '', false)),
-            ['.secret.txt', 'excludeMe.txt', 'test.css', 'test.js', 'testA.txt', 'testB.txt', 'testC.txt']
+            ['.secret.txt', 'double.setup.typoscript', 'excludeMe.txt', 'test.css', 'test.js', 'testA.txt', 'testB.txt', 'testC.txt']
         );
     }