Fixed bug #14971: Unit test for sanitizeLocalUrl fails on installations inside a...
authorSusanne Moog <typo3@susannemoog.de>
Thu, 8 Jul 2010 16:07:28 +0000 (16:07 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 8 Jul 2010 16:07:28 +0000 (16:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8141 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
tests/t3lib/t3lib_divTest.php

index 7905fc3..6e607f8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Follow-up to #14719: Wrong code comment (QUICKSTART/FIRST_INSTALL) (thanks to Steffen Gebert)
        * Fixed bug #14813: Install Tool uses deprecated function t3lib_stdGraphic->imagecreate() (thanks to Stefan Galinski)
 
        * Follow-up to #14719: Wrong code comment (QUICKSTART/FIRST_INSTALL) (thanks to Steffen Gebert)
        * Fixed bug #14813: Install Tool uses deprecated function t3lib_stdGraphic->imagecreate() (thanks to Stefan Galinski)
+       * Fixed bug #14971: Unit test for sanitizeLocalUrl fails on installations inside a subdirectory (thanks to Stefan Galinski & Pascal Jungblut)
 
 2010-07-08  Dmitry Dulepov  <dmitry@typo3.org>
 
 
 2010-07-08  Dmitry Dulepov  <dmitry@typo3.org>
 
index 2ecc2a6..730e67d 100644 (file)
@@ -653,18 +653,22 @@ class t3lib_divTest extends tx_phpunit_testcase {
         * @see sanitizeLocalUrlAcceptsValidUrls
         */
        public function validLocalUrlDataProvider() {
         * @see sanitizeLocalUrlAcceptsValidUrls
         */
        public function validLocalUrlDataProvider() {
+               $subDirectory = t3lib_div::getIndpEnv('TYPO3_SITE_PATH');
+               $typo3SiteUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
+               $typo3RequestHost = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST');
+
                return array(
                return array(
-                       array('alt_intro.php'),
-                       array('alt_intro.php?foo=1&bar=2'),
-                       array('/typo3/alt_intro.php'),
-                       array('/index.php'),
-                       array('../index.php'),
-                       array('../typo3/alt_intro.php'),
-                       array('../~userDirectory/index.php'),
-                       array('../typo3/mod.php?var1=test-case&var2=~user'),
-                       array(PATH_site . 'typo3/alt_intro.php'),
-                       array(t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'typo3/alt_intro.php'),
-                       array(t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . '/index.php'),
+                       '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/mod.php?var1=test-case&var2=~user' => array('../typo3/mod.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'),
                );
        }
 
                );
        }