[TASK] Remove wrong datasets in sanitizeLocalUrlValidPathsDataProvider 92/43092/3
authorNicole Cordes <typo3@cordes.co>
Mon, 7 Sep 2015 12:48:14 +0000 (14:48 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 7 Sep 2015 13:17:19 +0000 (15:17 +0200)
Within the GeneralUtilityTest::sanitizeLocalUrlValidPathsDataProvider
are still wrong dataset unfortunately. As on Windows systems the
GeneralUtility::getIndpEnv('TYPO3_SITE_URL') results in
http://D:/AbsolutePathToTypo3Installation those test were moved to an
own DataProvider which makes sure the HTTP_HOST and SCRIPT_NAME are set
correctly before calling GeneralUtility::getIndpEnv().

Resolves: #69584
Releases: master, 6.2
Change-Id: I42e5ab3712f82f5cadd51a478769bc5cb184243f
Reviewed-on: http://review.typo3.org/43092
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php

index 7ddf570..5536f20 100644 (file)
@@ -1980,22 +1980,14 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return array Valid url
         */
        public function sanitizeLocalUrlValidPathsDataProvider() {
-               $subDirectory = GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
-               $typo3SiteUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
-               $typo3RequestHost = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');
-
                return array(
                        'alt_intro.php' => array('alt_intro.php'),
                        'alt_intro.php?foo=1&bar=2' => array('alt_intro.php?foo=1&bar=2'),
-                       $subDirectory . 'typo3/alt_intro.php' => array($subDirectory . 'typo3/alt_intro.php'),
-                       $subDirectory . 'index.php' => array($subDirectory . 'index.php'),
                        '../index.php' => array('../index.php'),
                        '../typo3/alt_intro.php' => array('../typo3/alt_intro.php'),
                        '../~userDirectory/index.php' => array('../~userDirectory/index.php'),
                        '../typo3/index.php?var1=test-case&var2=~user' => array('../typo3/index.php?var1=test-case&var2=~user'),
                        PATH_site . 'typo3/alt_intro.php' => array(PATH_site . 'typo3/alt_intro.php'),
-                       $typo3SiteUrl . 'typo3/alt_intro.php' => array($typo3SiteUrl . 'typo3/alt_intro.php'),
-                       $typo3RequestHost . $subDirectory . '/index.php' => array($typo3RequestHost . $subDirectory . '/index.php')
                );
        }