Bug #50843

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

Added by Nicole Cordes almost 7 years ago. Updated over 1 year ago.

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

100%

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.

Associated revisions

Revision cc31a4d1 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Failing Resource\FactoryTest on Windows systems

Two tests in class TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest fail
with warnings. This is because of two single issues.

First of all the test depends on a folder which (might) belong to an own
storage other than storage 0 (fileadmin). This patch changes fileadmin
to the typo3 folder as this one should be not included in any storage.

On the other hand on Windows systems a full path contains always a colon
which breaks any storage check. To solve this we have to fix any
absolute path beforehand as it is done in the sub functions as well.

Resolves: #50843
Releases: 6.2, 6.1, 6.0
Change-Id: I950a3c81222155da403ca1eb7b920e8682033450
Reviewed-on: https://review.typo3.org/22894
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

Revision 903024c4 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Failing Resource\FactoryTest on Windows systems

Two tests in class TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest fail
with warnings. This is because of two single issues.

First of all the test depends on a folder which (might) belong to an own
storage other than storage 0 (fileadmin). This patch changes fileadmin
to the typo3 folder as this one should be not included in any storage.

On the other hand on Windows systems a full path contains always a colon
which breaks any storage check. To solve this we have to fix any
absolute path beforehand as it is done in the sub functions as well.

Resolves: #50843
Releases: 6.2, 6.1, 6.0
Change-Id: I950a3c81222155da403ca1eb7b920e8682033450
Reviewed-on: https://review.typo3.org/22912
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes

Revision f3f221d2 (diff)
Added by Nicole Cordes almost 7 years ago

[BUGFIX] Failing Resource\FactoryTest on Windows systems

Two tests in class TYPO3\CMS\Core\Tests\Unit\Resource\FactoryTest fail
with warnings. This is because of two single issues.

First of all the test depends on a folder which (might) belong to an own
storage other than storage 0 (fileadmin). This patch changes fileadmin
to the typo3 folder as this one should be not included in any storage.

On the other hand on Windows systems a full path contains always a colon
which breaks any storage check. To solve this we have to fix any
absolute path beforehand as it is done in the sub functions as well.

Resolves: #50843
Releases: 6.2, 6.1, 6.0
Change-Id: I950a3c81222155da403ca1eb7b920e8682033450
Reviewed-on: https://review.typo3.org/22914
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes

History

#1 Updated by Gerrit Code Review almost 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22894

#2 Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22894

#3 Updated by Nicole Cordes almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22912

#5 Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22914

#6 Updated by Nicole Cordes almost 7 years ago

  • Status changed from Under Review to Resolved

#7 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF