Bug #22556
closedcObj + PHPunit - Problem with cwd
0%
Description
Test that uses cobj->IMAGE fail in PHPunit, because working-directory is wrong.
I've defined an image with
file = EXT:plugin/img/demo.gif
When testing with PHPunit, then cObj->IMAGE tries
to read
/www/typo3/typo3/extplugin/img/demo.gif
and getcwd() is
/www/typo3/
While it should try to read
/www/typo3/extplugin/img/demo.gif
and getcwd() should be
/www/
as it is, when calling the the plugin from FE.
(issue imported from #M14264)
Files
Updated by Stefan Geith over 14 years ago
Note from Oliver Klee:
The problem is that the image functions expect to be called from the FE
index.php as they use relative file paths in
tslib_gifBuilder::getImageDimensions (inherited from t3lib_stdGraphic)
... and some of the called functions.
This can be fixed by appending some of the available path constants here
and there. So this needs to be fixed in the core (so that the image
functions work both in the "real" FE as well as called from the unit tests).
Updated by Stefan Geith over 14 years ago
Added Patches:
Added patch with unit-test: doesGetImgResourceReturnRightValue.patch
Fix: GetImgResourceCorrectFromPHPunit.patch
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.