[TYPO3-core] RFC #14264: cObj + PHPunit - Problem with cwd
Stefan Geith
typo3dev2010.nospam1 at geithware.de
Fri Apr 30 19:39:57 CEST 2010
Hi,
This is an SVN patch request.
Type: Bugfix
Branch: trunk
Bugtracker references:
http://bugs.typo3.org/view.php?id=14264
Problem:
Test that uses cobj->IMAGE fail in PHPunit, because working-directory is
wrong.
Additional information:
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.
Note from Oliver Klee (from DevList):
> 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).
>
Added Patches:
Patch doesGetImgResourceReturnRightValue adds a UNITtest.
Patch GetImgResourceCorrectFromPHPunit fixes the Problem
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: doesGetImgResourceReturnRightValue.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100430/fd7750d7/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GetImgResourceCorrectFromPHPunit.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100430/fd7750d7/attachment.txt>
More information about the TYPO3-team-core
mailing list