2 namespace TYPO3\CMS\Backend\Tests\Unit\Utility;
28 'header' =>
'dummy content header',
40 'sys_language_uid' =>
'0',
54 $mockedStorage = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class, array(), array(),
'',
false);
55 $mockedStorage->expects($this->any())->method(
'getRootLevelFolder')->will($this->returnValue(
56 new \TYPO3\CMS\Core\Resource\Folder($mockedStorage,
'/',
'/')
58 $mockedStorage->expects($this->any())->method(
'checkFolderActionPermission')->will($this->returnValue(
true));
59 $mockedStorage->expects($this->any())->method(
'isBrowsable')->will($this->returnValue(
true));
60 return new \TYPO3\CMS\Core\Resource\Folder($mockedStorage, $identifier, $identifier);
71 $mockedStorage = $this->getMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class, array(), array(),
'',
false);
72 $mockedFile = $this->getMock(\TYPO3\CMS\Core\Resource\File::class, array(), array(array(), $mockedStorage));
73 $mockedFile->expects($this->once())->method(
'getExtension')->will($this->returnValue($extension));
85 if (TYPO3_OS ==
'WIN') {
86 $this->markTestSkipped(
'imagemakeFixesPermissionsOnNewFiles() test not available on Windows.');
88 $fixtureGifFile = __DIR__ .
'/Fixtures/clear.gif';
90 $fixtureGifRessource = imagecreatefromgif($fixtureGifFile);
91 $targetFilename = PATH_site .
'typo3temp/' . $this->getUniqueId(
'test_') .
'.gif';
92 $this->testFilesToDelete[] = $targetFilename;
93 $GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'fileCreateMask'] =
'0777';
96 $resultFilePermissions = substr(decoct(fileperms($targetFilename)), 2);
97 $this->assertEquals($resultFilePermissions,
'0777');
132 $this->assertEquals(array(
't3-icon',
't3-icon-actions',
't3-icon-actions-juggle',
't3-icon-juggle'), $result);
144 $this->assertEquals(array(
't3-icon',
't3-icon-actions',
't3-icon-actions-juggle',
't3-icon-juggle-speed'), $result);
156 $this->assertEquals(array(
't3-icon',
't3-icon-actions',
't3-icon-actions-juggle',
't3-icon-juggle-speed-game'), $result);