49 $GLOBALS[
'TYPO3_LOADED_EXT'] = array();
50 $this->templateService = new \TYPO3\CMS\Core\TypoScript\TemplateService();
51 $this->templateService->tt_track = FALSE;
52 $this->templateServiceMock = $this->
getAccessibleMock(
'\\TYPO3\\CMS\\Core\\TypoScript\\TemplateService', array(
'dummy'));
53 $this->templateServiceMock->tt_track = FALSE;
62 $sysPageMock = $this->getMock(
'TYPO3\\CMS\\Frontend\\Page\\PageRepository');
63 $sysPageMock->expects($this->once())->method(
'versionOL')->with(
'sys_template', $row);
64 $GLOBALS[
'TSFE']->sys_page = $sysPageMock;
65 $this->templateService->versionOL($row);
73 $GLOBALS[
'TYPO3_LOADED_EXT'] = array(
76 'core',
'Tests/Unit/TypoScript/Fixtures/ext_typoscript_setup.txt' 81 $this->templateService->runThroughTemplates(array(), 0);
83 in_array(
'test.Core.TypoScript = 1', $this->templateService->config)
92 $GLOBALS[
'TYPO3_LOADED_EXT'] = array(
95 'core',
'Tests/Unit/TypoScript/Fixtures/ext_typoscript_setup.txt' 97 'ext_typoscript_constants.txt' =>
'' 101 $mockPackage = $this->getMock(
'TYPO3\\CMS\\Core\\Package\\Package', array(
'getPackagePath'), array(),
'', FALSE);
102 $mockPackage->expects($this->any())->method(
'getPackagePath')->will($this->returnValue(
''));
104 $mockPackageManager = $this->getMock(
'TYPO3\\CMS\\Core\\Package\\PackageManager', array(
'isPackageActive' ,
'getPackage'));
105 $mockPackageManager->expects($this->any())->method(
'isPackageActive')->will($this->returnValue(TRUE));
106 $mockPackageManager->expects($this->any())->method(
'getPackage')->will($this->returnValue($mockPackage));
109 $this->templateService->setProcessExtensionStatics(TRUE);
110 $this->templateService->runThroughTemplates(array(), 0);
113 in_array(
'test.Core.TypoScript = 1', $this->templateService->config)
123 $originalRootline = array(
124 0 => array(
'uid' => 2,
'title' =>
'originalTitle'),
125 1 => array(
'uid' => 3,
'title' =>
'originalTitle2'),
128 $updatedRootline = array(
129 0 => array(
'uid' => 1,
'title' =>
'newTitle'),
130 1 => array(
'uid' => 2,
'title' =>
'newTitle2'),
131 2 => array(
'uid' => 3,
'title' =>
'newTitle3'),
134 $expectedRootline = array(
135 0 => array(
'uid' => 2,
'title' =>
'newTitle2'),
136 1 => array(
'uid' => 3,
'title' =>
'newTitle3'),
139 $this->templateServiceMock->_set(
'rootLine', $originalRootline);
140 $this->templateServiceMock->updateRootlineData($updatedRootline);
141 $this->assertEquals($expectedRootline, $this->templateServiceMock->_get(
'rootLine'));
149 $originalRootline = array(
150 0 => array(
'uid' => 2,
'title' =>
'originalTitle'),
151 1 => array(
'uid' => 3,
'title' =>
'originalTitle2'),
154 $newInvalidRootline = array(
155 0 => array(
'uid' => 1,
'title' =>
'newTitle'),
156 1 => array(
'uid' => 2,
'title' =>
'newTitle2'),
159 $this->templateServiceMock->_set(
'rootLine', $originalRootline);
160 $this->templateServiceMock->updateRootlineData($newInvalidRootline);
167 $this->assertSame(
'http://example.com', $this->templateService->getFileName(
'http://example.com'));
168 $this->assertSame(
'https://example.com', $this->templateService->getFileName(
'https://example.com'));
175 $this->assertSame(
'typo3/index.php', $this->templateService->getFileName(
'typo3/index.php'));
182 $this->assertNull($this->templateService->getFileName(__DIR__));
189 $this->assertNull($this->templateService->getFileName(
' '));
190 $this->assertNull($this->templateService->getFileName(
'something/../else'));
static extPath($key, $script='')
versionOlCallsVersionOlOfPageSelectClassWithGivenRow()
static setPackageManager(\TYPO3\CMS\Core\Package\PackageManager $packageManager)
updateRootlineDataWithInvalidNewRootlineThrowsException()
getFileNameReturnsNullIfDirectory()
getFileNameReturnsNullWithInvalidFileName()
static makeInstance($className)
extensionStaticsAreProcessedIfExplicitlyRequested()
getFileNameReturnsFileCorrectly()
updateRootlineDataOverwritesOwnArrayData()
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
getFileNameReturnsUrlCorrectly()
extensionStaticFilesAreNotProcessedIfNotExplicitlyRequested()
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]