Bug #22556 » doesGetImgResourceReturnRightValue.patch
typo3/sysext/cms/tslib/tslib_content_testcase.php (Arbeitskopie) | ||
---|---|---|
}
|
||
/**
|
||
* Tests whether cImage returns right resource
|
||
*
|
||
* @test
|
||
*/
|
||
public function doesGetImgResourceReturnRightValue() {
|
||
$template = $this->getMock(
|
||
't3lib_TStemplate', array( 'linkData')
|
||
);
|
||
$template->allowedPaths = Array(
|
||
'media/',
|
||
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], // fileadmin/ path
|
||
'uploads/',
|
||
'typo3temp/',
|
||
't3lib/fonts/',
|
||
TYPO3_mainDir . 'ext/',
|
||
TYPO3_mainDir . 'sysext/',
|
||
TYPO3_mainDir . 'contrib/',
|
||
'typo3conf/ext/'
|
||
);
|
||
$template->getFileName_backPath = PATH_site;
|
||
$GLOBALS['TSFE']->tmpl = $template ;
|
||
$imgRes = 'typo3/sysext/cms/ext_icon.gif';
|
||
$result = $this->cObj->getImgResource($imgRes, NULL);
|
||
$this->assertEquals($imgRes, $result[3]);
|
||
$GLOBALS['TSFE']->tmpl = $this->template ;
|
||
}
|
||
/**
|
||
* Tests whether the getImgResource hook is called correctly.
|
||
*
|
||
* @test
|