40 $this->environmentService = $this->getMock(
'TYPO3\\CMS\\Extbase\\Service\\EnvironmentService');
41 $this->
inject($this->subject,
'environmentService', $this->environmentService);
48 $reference = $this->
getAccessibleMock(
'TYPO3\\CMS\\Core\\Resource\\FileReference', array(), array(),
'', FALSE);
49 $file = $this->getMock(
'TYPO3\\CMS\\Core\\Resource\\File', array(), array(),
'', FALSE);
50 $file->expects($this->once())->method(
'process')->willReturn($this->getMock(
'TYPO3\\CMS\\Core\\Resource\\ProcessedFile', array(), array(),
'', FALSE));
51 $reference->expects($this->once())->method(
'getOriginalFile')->willReturn($file);
52 $reference->_set(
'file', $file);
54 $this->subject->applyProcessingInstructions($reference, array());
62 'with scheme' => array(
'http://foo.bar/img.jpg',
'http://foo.bar/img.jpg'),
63 'scheme relative' => array(
'//foo.bar/img.jpg',
'//foo.bar/img.jpg'),
64 'without scheme' => array(
'foo.bar/img.jpg',
'/prefix/foo.bar/img.jpg'),
73 $this->environmentService->expects($this->any())->method(
'isEnvironmentInFrontendMode')->willReturn(TRUE);
75 $GLOBALS[
'TSFE']->absRefPrefix =
'/prefix/';
77 $file = $this->getMock(
'TYPO3\\CMS\\Core\\Resource\\File', array(), array(),
'', FALSE);
78 $file->expects($this->once())->method(
'getPublicUrl')->willReturn($imageUri);
80 $this->assertSame($expected, $this->subject->getImageUri($file));
inject($target, $name, $dependency)
fileIsUnwrappedFromReferenceForProcessing()
prefixIsCorrectlyAppliedToGetImageUri($imageUri, $expected)
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
prefixIsCorrectlyAppliedToGetImageUriDataProvider()