‪TYPO3CMS  10.4
FileHandlingUtilityTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
25 use TYPO3\CMS\Extensionmanager\Utility\EmConfUtility;
27 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
28 
32 class ‪FileHandlingUtilityTest extends UnitTestCase
33 {
37  protected ‪$fakedExtensions = [];
38 
46  protected function ‪createFakeExtension($extkeyOnly = false)
47  {
48  $extKey = strtolower(‪StringUtility::getUniqueId('testing'));
49  $absExtPath = ‪Environment::getVarPath() . '/tests/ext-' . $extKey . '/';
50  $relPath = 'typo3temp/var/tests/ext-' . $extKey . '/';
51  $this->fakedExtensions[$extKey] = [
52  'siteRelPath' => $relPath,
53  'siteAbsPath' => $absExtPath
54  ];
55  if ($extkeyOnly === true) {
56  return $extKey;
57  }
58  ‪GeneralUtility::mkdir($absExtPath);
59  $this->testFilesToDelete[] = ‪Environment::getVarPath() . '/tests/ext-' . $extKey;
60  return $extKey;
61  }
62 
67  {
68  $extKey = $this->‪createFakeExtension();
69  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['removeDirectory', 'addDirectory', 'getExtensionDir'], [], '', false);
70  $fileHandlerMock->expects(self::once())
71  ->method('removeDirectory')
72  ->with(‪Environment::getVarPath() . '/tests/ext-' . $extKey . '/');
73  $fileHandlerMock->expects(self::any())
74  ->method('getExtensionDir')
75  ->willReturn(‪Environment::getVarPath() . '/tests/ext-' . $extKey . '/');
76  $fileHandlerMock->_call('makeAndClearExtensionDir', $extKey);
77  }
78 
82  public function ‪invalidRelativePathDataProvider()
83  {
84  return [
85  ['../../'],
86  ['/foo/bar'],
87  ['foo//bar'],
88  ['foo/bar' . "\0"],
89  ];
90  }
91 
97  public function ‪getAbsolutePathThrowsExceptionForInvalidRelativePaths($invalidRelativePath)
98  {
99  $this->expectException(ExtensionManagerException::class);
100  $this->expectExceptionCode(1350742864);
101  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy'], []);
102  $fileHandlerMock->_call('getAbsolutePath', $invalidRelativePath);
103  }
104 
108  public function ‪validRelativePathDataProvider()
109  {
110  return [
111  ['foo/../bar', ‪Environment::getPublicPath() . '/bar'],
112  ['bas', ‪Environment::getPublicPath() . '/bas'],
113  ];
114  }
115 
122  public function ‪getAbsolutePathReturnsAbsolutePathForValidRelativePaths($validRelativePath, $expectedAbsolutePath)
123  {
124  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy']);
125  self::assertSame($expectedAbsolutePath, $fileHandlerMock->_call('getAbsolutePath', $validRelativePath));
126  }
127 
131  public function ‪makeAndClearExtensionDirAddsDir()
132  {
133  $extKey = $this->‪createFakeExtension();
134  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['removeDirectory', 'addDirectory', 'getExtensionDir']);
135  $fileHandlerMock->expects(self::once())
136  ->method('addDirectory')
137  ->with(‪Environment::getVarPath() . '/tests/ext-' . $extKey . '/');
138  $fileHandlerMock->expects(self::any())
139  ->method('getExtensionDir')
140  ->willReturn(‪Environment::getVarPath() . '/tests/ext-' . $extKey . '/');
141  $fileHandlerMock->_call('makeAndClearExtensionDir', $extKey);
142  }
143 
148  {
149  $this->expectException(ExtensionManagerException::class);
150  $this->expectExceptionCode(1337280417);
151  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['removeDirectory', 'addDirectory']);
152  $languageServiceMock = $this->getMockBuilder(LanguageService::class)->disableOriginalConstructor()->getMock();
153  $fileHandlerMock->_set('languageService', $languageServiceMock);
154  $fileHandlerMock->_call('makeAndClearExtensionDir', 'testing123', 'fakepath');
155  }
156 
160  public function ‪addDirectoryAddsDirectory()
161  {
162  $extDirPath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test-extensions-');
163  $this->testFilesToDelete[] = $extDirPath;
164  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy']);
165  $fileHandlerMock->_call('addDirectory', $extDirPath);
166  self::assertTrue(is_dir($extDirPath));
167  }
168 
172  public function ‪removeDirectoryRemovesDirectory()
173  {
174  $extDirPath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test-extensions-');
175  @mkdir($extDirPath);
176  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy']);
177  $fileHandlerMock->_call('removeDirectory', $extDirPath);
178  self::assertFalse(is_dir($extDirPath));
179  }
180 
184  public function ‪removeDirectoryRemovesSymlink()
185  {
186  $absoluteSymlinkPath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_symlink_');
187  $absoluteFilePath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_file_');
188  touch($absoluteFilePath);
189  $this->testFilesToDelete[] = $absoluteFilePath;
190  symlink($absoluteFilePath, $absoluteSymlinkPath);
191  $fileHandler = new ‪FileHandlingUtility();
192  $fileHandler->removeDirectory($absoluteSymlinkPath);
193  self::assertFalse(is_link($absoluteSymlinkPath));
194  }
195 
200  {
201  $absoluteSymlinkPath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_symlink_');
202  $absoluteDirectoryPath = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('test_dir_') . '/';
203  $relativeFilePath = ‪StringUtility::getUniqueId('test_file_');
204 
205  mkdir($absoluteDirectoryPath);
206  touch($absoluteDirectoryPath . $relativeFilePath);
207 
208  $this->testFilesToDelete[] = $absoluteDirectoryPath . $relativeFilePath;
209  $this->testFilesToDelete[] = $absoluteDirectoryPath;
210 
211  symlink($absoluteDirectoryPath, $absoluteSymlinkPath);
212 
213  $fileHandler = new ‪FileHandlingUtility();
214  $fileHandler->removeDirectory($absoluteSymlinkPath);
215  self::assertTrue(is_file($absoluteDirectoryPath . $relativeFilePath));
216  }
217 
222  {
223  $extensionData = [
224  'extKey' => 'test'
225  ];
226  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, [
227  'makeAndClearExtensionDir',
228  'writeEmConfToFile',
229  'extractFilesArrayFromExtensionData',
230  'extractDirectoriesFromExtensionData',
231  'createDirectoriesForExtensionFiles',
232  'writeExtensionFiles',
233  'reloadPackageInformation',
234  ]);
235  $fileHandlerMock->expects(self::once())->method('extractFilesArrayFromExtensionData')->willReturn([]);
236  $fileHandlerMock->expects(self::once())->method('extractDirectoriesFromExtensionData')->willReturn([]);
237  $fileHandlerMock->expects(self::once())->method('makeAndClearExtensionDir')->with($extensionData['extKey']);
238  $fileHandlerMock->_call('unpackExtensionFromExtensionDataArray', $extensionData);
239  }
240 
245  {
246  $extensionData = [
247  'extKey' => 'test'
248  ];
249  $files = [
250  'ChangeLog' => [
251  'name' => 'ChangeLog',
252  'size' => 4559,
253  'mtime' => 1219448527,
254  'is_executable' => false,
255  'content' => 'some content to write'
256  ],
257  'doc/' => [
258  'name' => 'doc/',
259  'size' => 0,
260  'mtime' => 1219448527,
261  'is_executable' => false,
262  'content' => ''
263  ],
264  'doc/ChangeLog' => [
265  'name' => 'ChangeLog',
266  'size' => 4559,
267  'mtime' => 1219448527,
268  'is_executable' => false,
269  'content' => 'some content to write'
270  ],
271  ];
272  $cleanedFiles = [
273  'ChangeLog' => [
274  'name' => 'ChangeLog',
275  'size' => 4559,
276  'mtime' => 1219448527,
277  'is_executable' => false,
278  'content' => 'some content to write'
279  ],
280  'doc/ChangeLog' => [
281  'name' => 'ChangeLog',
282  'size' => 4559,
283  'mtime' => 1219448527,
284  'is_executable' => false,
285  'content' => 'some content to write'
286  ],
287  ];
288  $directories = [
289  'doc/',
290  'mod/doc/'
291  ];
292 
293  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, [
294  'makeAndClearExtensionDir',
295  'writeEmConfToFile',
296  'extractFilesArrayFromExtensionData',
297  'extractDirectoriesFromExtensionData',
298  'createDirectoriesForExtensionFiles',
299  'writeExtensionFiles',
300  'reloadPackageInformation',
301  ]);
302  $fileHandlerMock->expects(self::once())->method('extractFilesArrayFromExtensionData')->willReturn($files);
303  $fileHandlerMock->expects(self::once())->method('extractDirectoriesFromExtensionData')->willReturn($directories);
304  $fileHandlerMock->expects(self::once())->method('createDirectoriesForExtensionFiles')->with($directories);
305  $fileHandlerMock->expects(self::once())->method('writeExtensionFiles')->with($cleanedFiles);
306  $fileHandlerMock->expects(self::once())->method('reloadPackageInformation')->with('test');
307  $fileHandlerMock->_call('unpackExtensionFromExtensionDataArray', $extensionData);
308  }
309 
314  {
315  $extensionData = [
316  'key' => 'test',
317  'FILES' => [
318  'filename1' => 'dummycontent',
319  'filename2' => 'dummycontent2'
320  ]
321  ];
322  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['makeAndClearExtensionDir']);
323  $extractedFiles = $fileHandlerMock->_call('extractFilesArrayFromExtensionData', $extensionData);
324  self::assertArrayHasKey('filename1', $extractedFiles);
325  self::assertArrayHasKey('filename2', $extractedFiles);
326  }
327 
331  public function ‪writeExtensionFilesWritesFiles()
332  {
333  $files = [
334  'ChangeLog' => [
335  'name' => 'ChangeLog',
336  'size' => 4559,
337  'mtime' => 1219448527,
338  'is_executable' => false,
339  'content' => 'some content to write'
340  ],
341  'README' => [
342  'name' => 'README',
343  'size' => 4566,
344  'mtime' => 1219448533,
345  'is_executable' => false,
346  'content' => 'FEEL FREE TO ADD SOME DOCUMENTATION HERE'
347  ]
348  ];
349  $rootPath = ($extDirPath = $this->fakedExtensions[$this->‪createFakeExtension()]['siteAbsPath']);
350  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['makeAndClearExtensionDir']);
351  $fileHandlerMock->_call('writeExtensionFiles', $files, $rootPath);
352  self::assertTrue(file_exists($rootPath . 'ChangeLog'));
353  }
354 
359  {
360  $files = [
361  'ChangeLog' => [
362  'name' => 'ChangeLog',
363  'size' => 4559,
364  'mtime' => 1219448527,
365  'is_executable' => false,
366  'content' => 'some content to write'
367  ],
368  'doc/' => [
369  'name' => 'doc/',
370  'size' => 0,
371  'mtime' => 1219448527,
372  'is_executable' => false,
373  'content' => ''
374  ],
375  'doc/ChangeLog' => [
376  'name' => 'ChangeLog',
377  'size' => 4559,
378  'mtime' => 1219448527,
379  'is_executable' => false,
380  'content' => 'some content to write'
381  ],
382  'doc/README' => [
383  'name' => 'README',
384  'size' => 4566,
385  'mtime' => 1219448533,
386  'is_executable' => false,
387  'content' => 'FEEL FREE TO ADD SOME DOCUMENTATION HERE'
388  ],
389  'mod/doc/README' => [
390  'name' => 'README',
391  'size' => 4566,
392  'mtime' => 1219448533,
393  'is_executable' => false,
394  'content' => 'FEEL FREE TO ADD SOME DOCUMENTATION HERE'
395  ]
396  ];
397  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['makeAndClearExtensionDir']);
398  $extractedDirectories = $fileHandlerMock->_call('extractDirectoriesFromExtensionData', $files);
399  $expected = [
400  'doc/',
401  'mod/doc/'
402  ];
403  self::assertSame($expected, array_values($extractedDirectories));
404  }
405 
410  {
411  $rootPath = $this->fakedExtensions[$this->‪createFakeExtension()]['siteAbsPath'];
412  $directories = [
413  'doc/',
414  'mod/doc/'
415  ];
416  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['makeAndClearExtensionDir']);
417  self::assertFalse(is_dir($rootPath . 'doc/'));
418  self::assertFalse(is_dir($rootPath . 'mod/doc/'));
419  $fileHandlerMock->_call('createDirectoriesForExtensionFiles', $directories, $rootPath);
420  self::assertTrue(is_dir($rootPath . 'doc/'));
421  self::assertTrue(is_dir($rootPath . 'mod/doc/'));
422  }
423 
427  public function ‪writeEmConfWritesEmConfFile()
428  {
429  $extKey = $this->‪createFakeExtension();
430  $extensionData = [
431  'extKey' => $extKey,
432  'EM_CONF' => [
433  'title' => 'Plugin cache engine',
434  'description' => 'Provides an interface to cache plugin content elements based on 4.3 caching framework',
435  'category' => 'Frontend',
436  ]
437  ];
438  $rootPath = $this->fakedExtensions[$extKey]['siteAbsPath'];
439  $emConfUtilityMock = $this->getAccessibleMock(EmConfUtility::class, ['constructEmConf']);
440  $emConfUtilityMock->expects(self::once())->method('constructEmConf')->with($extensionData)->willReturn(var_export($extensionData['EM_CONF'], true));
441  $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['makeAndClearExtensionDir']);
442  $fileHandlerMock->_set('emConfUtility', $emConfUtilityMock);
443  $fileHandlerMock->_call('writeEmConfToFile', $extensionData, $rootPath);
444  self::assertTrue(file_exists($rootPath . 'ext_emconf.php'));
445  }
446 
451  {
453  $fileHandlerMock = $this->getMockBuilder(FileHandlingUtility::class)
454  ->setMethods(['createNestedDirectory', 'getAbsolutePath', 'directoryExists'])
455  ->getMock();
456  $fileHandlerMock->expects(self::any())
457  ->method('getAbsolutePath')
458  ->willReturnArgument(0);
459  return $fileHandlerMock;
460  }
461 
468  {
469  // 42 second of first day in 1970 - used to have achieve stable file names
470  ‪$GLOBALS['EXEC_TIME'] = 42;
471 
472  // Create extension for testing:
473  $extKey = $this->‪createFakeExtension();
474  $extensionRoot = $this->fakedExtensions[$extKey]['siteAbsPath'];
475 
476  // Build mocked fileHandlingUtility:
477  $fileHandlerMock = $this->getAccessibleMock(
478  FileHandlingUtility::class,
479  ['getAbsoluteExtensionPath', 'getExtensionVersion']
480  );
481  $fileHandlerMock->expects(self::any())
482  ->method('getAbsoluteExtensionPath')
483  ->willReturn($extensionRoot);
484  $fileHandlerMock->expects(self::any())
485  ->method('getExtensionVersion')
486  ->willReturn('0.0.0');
487 
488  // Add files and directories to extension:
489  touch($extensionRoot . 'emptyFile.txt');
490  file_put_contents($extensionRoot . 'notEmptyFile.txt', 'content');
491  touch($extensionRoot . '.hiddenFile');
492  mkdir($extensionRoot . 'emptyDir');
493  mkdir($extensionRoot . 'notEmptyDir');
494  touch($extensionRoot . 'notEmptyDir/file.txt');
495 
496  // Create zip-file from extension
497  $filename = $fileHandlerMock->_call('createZipFileFromExtension', $extKey);
498 
499  $expectedFilename = ‪Environment::getVarPath() . '/transient/' . $extKey . '_0.0.0_' . date('YmdHi', 42) . '.zip';
500  $this->testFilesToDelete[] = $filename;
501  self::assertEquals($expectedFilename, $filename, 'Archive file name differs from expectation');
502 
503  // File was created
504  self::assertTrue(file_exists($filename), 'Zip file not created');
505 
506  // Read archive and check its contents
507  $archive = new \ZipArchive();
508  self::assertTrue($archive->open($filename), 'Unable to open archive');
509  self::assertEquals($archive->statName('emptyFile.txt')['size'], 0, 'Empty file not in archive');
510  self::assertEquals($archive->getFromName('notEmptyFile.txt'), 'content', 'Expected content not found');
511  self::assertFalse($archive->statName('.hiddenFile'), 'Hidden file not in archive');
512  self::assertTrue(is_array($archive->statName('emptyDir/')), 'Empty directory not in archive');
513  self::assertTrue(is_array($archive->statName('notEmptyDir/')), 'Not empty directory not in archive');
514  self::assertTrue(is_array($archive->statName('notEmptyDir/file.txt')), 'File within directory not in archive');
515 
516  // Check that the archive has no additional content
517  self::assertEquals($archive->numFiles, 5, 'Too many or too less files in archive');
518  }
519 }
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\makeAndClearExtensionDirThrowsExceptionOnInvalidPath
‪makeAndClearExtensionDirThrowsExceptionOnInvalidPath()
Definition: FileHandlingUtilityTest.php:146
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\validRelativePathDataProvider
‪array validRelativePathDataProvider()
Definition: FileHandlingUtilityTest.php:107
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\extractFilesArrayFromExtensionDataReturnsFileArray
‪extractFilesArrayFromExtensionDataReturnsFileArray()
Definition: FileHandlingUtilityTest.php:312
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:180
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory
‪removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory()
Definition: FileHandlingUtilityTest.php:198
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\invalidRelativePathDataProvider
‪array invalidRelativePathDataProvider()
Definition: FileHandlingUtilityTest.php:81
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility
Definition: DependencyUtilityTest.php:16
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\makeAndClearExtensionDirAddsDir
‪makeAndClearExtensionDirAddsDir()
Definition: FileHandlingUtilityTest.php:130
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryRemovesDirectory
‪removeDirectoryRemovesDirectory()
Definition: FileHandlingUtilityTest.php:171
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\removeDirectoryRemovesSymlink
‪removeDirectoryRemovesSymlink()
Definition: FileHandlingUtilityTest.php:183
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\createZipFileFromExtensionGeneratesCorrectArchive
‪createZipFileFromExtensionGeneratesCorrectArchive()
Definition: FileHandlingUtilityTest.php:466
‪TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility
Definition: FileHandlingUtility.php:35
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\extractDirectoriesFromExtensionDataExtractsDirectories
‪extractDirectoriesFromExtensionDataExtractsDirectories()
Definition: FileHandlingUtilityTest.php:357
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest
Definition: FileHandlingUtilityTest.php:33
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\addDirectoryAddsDirectory
‪addDirectoryAddsDirectory()
Definition: FileHandlingUtilityTest.php:159
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\unpackExtensionFromExtensionDataArrayCreatesTheExtensionDirectory
‪unpackExtensionFromExtensionDataArrayCreatesTheExtensionDirectory()
Definition: FileHandlingUtilityTest.php:220
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\getPreparedFileHandlingMockForDirectoryCreationTests
‪PHPUnit Framework MockObject MockObject FileHandlingUtility getPreparedFileHandlingMockForDirectoryCreationTests()
Definition: FileHandlingUtilityTest.php:449
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\writeExtensionFilesWritesFiles
‪writeExtensionFilesWritesFiles()
Definition: FileHandlingUtilityTest.php:330
‪TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
Definition: ExtensionManagerException.php:24
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\unpackExtensionFromExtensionDataArrayStripsDirectoriesFromFilesArray
‪unpackExtensionFromExtensionDataArrayStripsDirectoriesFromFilesArray()
Definition: FileHandlingUtilityTest.php:243
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\getAbsolutePathThrowsExceptionForInvalidRelativePaths
‪getAbsolutePathThrowsExceptionForInvalidRelativePaths($invalidRelativePath)
Definition: FileHandlingUtilityTest.php:96
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\writeEmConfWritesEmConfFile
‪writeEmConfWritesEmConfFile()
Definition: FileHandlingUtilityTest.php:426
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists
‪makeAndClearExtensionDirRemovesExtensionDirIfAlreadyExists()
Definition: FileHandlingUtilityTest.php:65
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\createDirectoriesForExtensionFilesCreatesDirectories
‪createDirectoriesForExtensionFilesCreatesDirectories()
Definition: FileHandlingUtilityTest.php:408
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\$fakedExtensions
‪array $fakedExtensions
Definition: FileHandlingUtilityTest.php:36
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir
‪static bool mkdir($newFolder)
Definition: GeneralUtility.php:2005
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static string getVarPath()
Definition: Environment.php:192
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\createFakeExtension
‪string createFakeExtension($extkeyOnly=false)
Definition: FileHandlingUtilityTest.php:45
‪TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest\getAbsolutePathReturnsAbsolutePathForValidRelativePaths
‪getAbsolutePathReturnsAbsolutePathForValidRelativePaths($validRelativePath, $expectedAbsolutePath)
Definition: FileHandlingUtilityTest.php:121