Bug #50843
closedFix TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest on Windows systems
100%
Description
The test retrieveFileOrFolderObjectReturnsFolderIfPathIsGiven in class TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest fails with warnings
Retrieve file or folder object returns folder if path is given with data set "relative path"
Failure in test case retrieveFileOrFolderObjectReturnsFolderIfPathIsGiven with data set "relative path"
File: D:\TYPO3\TYPO3 extensions\phpunit\Composer\vendor\phpunit\phpunit-mock-objects\PHPUnit\Framework\MockObject\InvocationMocker.php
Line: 198
Expectation failed for method name is equal to <string:getFolder> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.
retrieveFileOrFolderObjectReturnsFolderIfPathIsGiven with data set "path with PATH site"
Failure in test case retrieveFileOrFolderObjectReturnsFolderIfPathIsGiven with data set "path with PATH_site"
File: D:\TYPO3\TYPO3 extensions\phpunit\Composer\vendor\phpunit\phpunit-mock-objects\PHPUnit\Framework\MockObject\InvocationMocker.php
Line: 198
Expectation failed for method name is equal to <string:getFolder> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.
This is because of two single issues. First of all a folder is tested which (might) belong to an own storage other than storage 0. On the other hand on Windows system a full path contains always an colon which breaks any storage check. We have to fix any absolute path beforehand as it is done in the sub functions as well.