Project

General

Profile

Actions

Bug #50843

closed

Fix TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest on Windows systems

Added by Nicole Cordes over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2013-08-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF