[TYPO3-core] RFC #14264: cObj + PHPunit - Problem with cwd
Stefan Geith
typo3dev2010.nospam1 at geithware.de
Tue May 11 10:41:35 CEST 2010
Hi Susanne,
Susanne Moog schrieb:
>> [...]
>
> Yep, this clarifies the problem and I had a look but I'm afraid the fix
> does not work fully.
> [...]
> You can
> test that flaw easily by setting this in your typoscript (and have
> ghostscript installed):
>
> page.40 = IMAGE
> page.40.file = fileadmin/test.pdf
>
> This will result in an image tag with a pdf file as src="". Without your
> patch you get an image in typo3temp.
OK - I see.
Maybe you could modifiy the patch for the Testcase, to test for
correct behaviour ?
Don't know how to 'assert' this, maybe something like
public function getImageResource() {
...
...
$imgRes = 'EXT:cms/ext_icon.gif';
$expected = 'typo3/sysext/cms/ext_icon.gif';
$result = $this->cObj->IMG_RESOURCE(Array('file'=>$imgRes,
'file.'=>Array('width'=>'123')));
$this->assertNotEquals($expected, $result);
}
What do you think ?
(But assertNotEquals does not exist in PHPunit hmmm - how to
check this ?)
/Stefan
More information about the TYPO3-team-core
mailing list