From f635d8288f85d857dd033e63b2c0dce293aaf3e4 Mon Sep 17 00:00:00 2001 From: Nicole Cordes <typo3@cordes.co> Date: Mon, 7 Sep 2015 14:48:14 +0200 Subject: [PATCH] [TASK] Remove wrong datasets in sanitizeLocalUrlValidPathsDataProvider 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> --- .../sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php index 7ddf570fd9d3..5536f20d9637 100644 --- a/typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php +++ b/typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php @@ -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') ); } -- GitLab