Index: typo3/sysext/cms/tslib/tslib_content_testcase.php =================================================================== --- typo3/sysext/cms/tslib/tslib_content_testcase.php (Revision 7434) +++ typo3/sysext/cms/tslib/tslib_content_testcase.php (Arbeitskopie) @@ -100,6 +100,36 @@ } /** + * 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