Project

General

Profile

Actions

Bug #22556

closed

cObj + PHPunit - Problem with cwd

Added by Stefan Geith over 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-04-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Actions #1

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).

Actions #2

Updated by Stefan Geith over 14 years ago

Added Patches:
Added patch with unit-test: doesGetImgResourceReturnRightValue.patch
Fix: GetImgResourceCorrectFromPHPunit.patch

Actions #3

Updated by Stefan Geith over 14 years ago

Added new patches for trunk R7519

Actions #4

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)?

Actions #5

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.

Actions

Also available in: Atom PDF