[BUGFIX] Failing Unit Tests on Windows systems 03/46603/2
authorNicole Cordes <typo3@cordes.co>
Fri, 29 Jan 2016 11:56:23 +0000 (12:56 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 12 Feb 2016 09:30:20 +0000 (10:30 +0100)
Due to realpath usage some Unit Tests are failing on Windows systems.
The tests have to ensure that forward slashes are used for comparison.

Resolves: #73006
Releases: master, 7.6, 6.2
Change-Id: Iee64ab873d519fee07c6b69e63de1f7d645c071b
Reviewed-on: https://review.typo3.org/46603
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/core/Tests/Unit/Cache/Backend/FileBackendTest.php

index 87418bb..01f1263 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Cache\Backend;
 
 use \org\bovigo\vfs\vfsStreamDirectory;
 use \org\bovigo\vfs\vfsStreamWrapper;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Testcase for the File cache backend
@@ -400,7 +401,7 @@ class FileBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $backend->_set('cacheIdentifier', 'test');
                $backend->setCacheDirectory('tmp/foo');
                // get PATH_site without trailing slash
-               $path = realpath(PATH_site);
+               $path = GeneralUtility::fixWindowsFilePath(realpath(PATH_site));
                $this->assertEquals($path . '/tmp/foo/test/', $backend->_get('temporaryCacheDirectory'));
        }
 
@@ -412,7 +413,7 @@ class FileBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $backend->_set('cacheIdentifier', 'test');
                $backend->setCacheDirectory('tmp/foo/');
                // get PATH_site without trailing slash
-               $path = realpath(PATH_site);
+               $path = GeneralUtility::fixWindowsFilePath(realpath(PATH_site));
                $this->assertEquals($path . '/tmp/foo/test/', $backend->_get('temporaryCacheDirectory'));
        }
 
@@ -424,7 +425,7 @@ class FileBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $backend->_set('cacheIdentifier', 'test');
                $backend->setCacheDirectory('../tmp/foo');
                // get PATH_site without trailing slash
-               $path = realpath(PATH_site);
+               $path = GeneralUtility::fixWindowsFilePath(realpath(PATH_site));
                $this->assertEquals($path . '/../tmp/foo/test/', $backend->_get('temporaryCacheDirectory'));
        }
 
@@ -436,7 +437,7 @@ class FileBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $backend->_set('cacheIdentifier', 'test');
                $backend->setCacheDirectory('../tmp/foo/');
                // get PATH_site without trailing slash
-               $path = realpath(PATH_site);
+               $path = GeneralUtility::fixWindowsFilePath(realpath(PATH_site));
                $this->assertEquals($path . '/../tmp/foo/test/', $backend->_get('temporaryCacheDirectory'));
        }