‪TYPO3CMS  10.4
ResourceStorageTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
31 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
32 
36 class ‪ResourceStorageTest extends FunctionalTestCase
37 {
38  protected function ‪tearDown(): void
39  {
40  // cleanup manually created folders
41  foreach (glob(‪Environment::getPublicPath() . '/fileadmin/*') as $folderToRemove) {
42  ‪GeneralUtility::rmdir($folderToRemove, true);
43  }
44  parent::tearDown();
45  }
46 
51  {
52  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
53  $this->setUpBackendUserFromFixture(1);
54  $subject = (new ‪StorageRepository())->findByUid(1);
55  $subject->setEvaluatePermissions(false);
56 
59  ‪GeneralUtility::mkdir_deep(‪Environment::getPublicPath() . '/typo3temp/assets/_processed_/');
60  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/adirectory/bar.txt', 'myData');
61  clearstatcache();
62  $subject->addFileMount('/adirectory/', ['read_only' => false]);
63  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/adirectory/bar.txt');
64 
65  $rootProcessingFolder = $subject->getProcessingFolder();
66  $processingFolder = $subject->getProcessingFolder($file);
67 
68  self::assertInstanceOf(Folder::class, $processingFolder);
69  self::assertNotEquals($rootProcessingFolder, $processingFolder);
70 
71  for ($i = ‪ResourceStorage::PROCESSING_FOLDER_LEVELS; $i>0; $i--) {
72  $processingFolder = $processingFolder->getParentFolder();
73  }
74  self::assertEquals($rootProcessingFolder, $processingFolder);
75  }
76 
86  public function ‪isWithinFileMountBoundariesRespectsReadOnlyFileMounts($targetDirectory, $fileMountFolder, $isFileMountReadOnly, $checkWriteAccess, $expectedResult)
87  {
88  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
89  $fileName = 'bar.txt';
90  $this->setUpBackendUserFromFixture(1);
92  ‪GeneralUtility::mkdir_deep(‪Environment::getPublicPath() . '/fileadmin/' . $targetDirectory);
93  if ($fileMountFolder !== $targetDirectory) {
94  ‪GeneralUtility::mkdir_deep(‪Environment::getPublicPath() . '/fileadmin/' . $fileMountFolder);
95  }
96  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/' . $targetDirectory . '/' . $fileName, 'myData');
97  clearstatcache();
98  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/' . $targetDirectory . '/' . $fileName);
99 
100  $subject = (new ‪StorageRepository())->findByUid(1);
101  $subject->setEvaluatePermissions(true);
102 
103  // read_only = true -> no write access for user, so checking for second argument true should assert false
104  $subject->addFileMount('/' . $fileMountFolder . '/', ['read_only' => $isFileMountReadOnly]);
105  self::assertSame($expectedResult, $subject->isWithinFileMountBoundaries($file, $checkWriteAccess));
106  }
107 
112  {
113  return [
114  'Access to file in ro file mount denied for write request' => [
115  '$targetDirectory' => 'fooBaz',
116  '$fileMountFolder' => 'fooBaz',
117  '$isFileMountReadOnly' => true,
118  '$checkWriteAccess' => true,
119  '$expectedResult' => false,
120  ],
121  'Access to file in ro file mount allowed for read request' => [
122  '$targetDirectory' => 'fooBaz',
123  '$fileMountFolder' => 'fooBaz',
124  '$isFileMountReadOnly' => true,
125  '$checkWriteAccess' => false,
126  '$expectedResult' => true,
127  ],
128  'Access to file in rw file mount allowed for write request' => [
129  '$targetDirectory' => 'fooBaz',
130  '$fileMountFolder' => 'fooBaz',
131  '$isFileMountReadOnly' => false,
132  '$checkWriteAccess' => true,
133  '$expectedResult' => true,
134  ],
135  'Access to file in rw file mount allowed for read request' => [
136  '$targetDirectory' => 'fooBaz',
137  '$fileMountFolder' => 'fooBaz',
138  '$isFileMountReadOnly' => false,
139  '$checkWriteAccess' => false,
140  '$expectedResult' => true,
141  ],
142  'Access to file not in file mount denied for write request' => [
143  '$targetDirectory' => 'fooBaz',
144  '$fileMountFolder' => 'barBaz',
145  '$isFileMountReadOnly' => false,
146  '$checkWriteAccess' => true,
147  '$expectedResult' => false,
148  ],
149  'Access to file not in file mount denied for read request' => [
150  '$targetDirectory' => 'fooBaz',
151  '$fileMountFolder' => 'barBaz',
152  '$isFileMountReadOnly' => false,
153  '$checkWriteAccess' => false,
154  '$expectedResult' => false,
155  ],
156  ];
157  }
158 
163  {
164  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
165  $this->setUpBackendUserFromFixture(1);
166 
167  $subject = (new ‪StorageRepository())->findByUid(1);
168  $processingFolder = $subject->getProcessingFolder();
169 
170  self::assertInstanceOf(Folder::class, $processingFolder);
171  }
172 
177  {
178  $folderIdentifier = ‪StringUtility::getUniqueId();
179  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
180  $this->setUpBackendUserFromFixture(1);
181 
182  $subject = (new ‪StorageRepository())->findByUid(1);
183  $folder = new ‪Folder($subject, '/foo/' . $folderIdentifier . '/', $folderIdentifier);
184 
185  $role = $subject->getRole($folder);
186 
187  self::assertSame(‪FolderInterface::ROLE_DEFAULT, $role);
188  }
189 
194  {
195  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
196  $this->setUpBackendUserFromFixture(1);
197  $subject = (new ‪StorageRepository())->findByUid(1);
198 
200  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt', 'myData');
201  clearstatcache();
202  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/foo/bar.txt');
203 
204  $this->expectException(\InvalidArgumentException::class);
205  $this->expectExceptionCode(1325842622);
206  $subject->replaceFile($file, ‪Environment::getPublicPath() . '/' . ‪StringUtility::getUniqueId());
207  }
208 
213  {
214  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
215  $this->setUpBackendUserFromFixture(1);
216  $subject = (new ‪StorageRepository())->findByUid(1);
217 
218  $this->expectException(\InvalidArgumentException::class);
219  $this->expectExceptionCode(1325689164);
220  $subject->createFolder('newFolder', new ‪Folder($subject, '/foo/', 'foo'));
221  }
222 
227  {
228  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
229  $this->setUpBackendUserFromFixture(1);
230  $subject = (new ‪StorageRepository())->findByUid(1);
231 
234  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt', 'myData');
235  clearstatcache();
236 
237  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/foo/bar.txt');
238  $subject->deleteFile($file);
239 
240  self::assertTrue(file_exists(‪Environment::getPublicPath() . '/fileadmin/_recycler_/bar.txt'));
241  self::assertFalse(file_exists(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt'));
242  }
243 
248  {
249  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
250  $this->setUpBackendUserFromFixture(1);
251  $subject = (new ‪StorageRepository())->findByUid(1);
252 
254  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt', 'myData');
255  clearstatcache();
256 
257  $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/foo/bar.txt');
258  $subject->deleteFile($file);
259 
260  self::assertFalse(file_exists(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt'));
261  }
262 
264  {
265  return [
266  'Finds foo recursive by name' => [
267  'foo',
268  '/bar/',
269  true,
270  [],
271  [
272  '/bar/bla/foo.txt',
273  ],
274  ],
275  'Finds foo not recursive by name' => [
276  'foo',
277  '/bar/bla/',
278  false,
279  [],
280  [
281  '/bar/bla/foo.txt',
282  ],
283  ],
284  'Finds nothing when not recursive for top level folder' => [
285  'foo',
286  '/bar/',
287  false,
288  [],
289  [],
290  ],
291  'Finds foo by description' => [
292  'fodescrip',
293  '/bar/',
294  true,
295  [],
296  [
297  '/bar/bla/foo.txt',
298  ],
299  ],
300  'Finds foo by translated description' => [
301  'fotranslated',
302  '/bar/',
303  true,
304  [],
305  [
306  '/bar/bla/foo.txt',
307  ],
308  ],
309  'Finds blupp by name' => [
310  'blupp',
311  '/bar/',
312  false,
313  [],
314  [
315  '/bar/blupp.txt',
316  ],
317  ],
318  'Finds only blupp by title for non recursive' => [
319  'title',
320  '/bar/',
321  false,
322  [],
323  [
324  '/bar/blupp.txt',
325  ],
326  ],
327  'Finds foo and blupp by title for recursive' => [
328  'title',
329  '/bar/',
330  true,
331  [],
332  [
333  '/bar/blupp.txt',
334  '/bar/bla/foo.txt',
335  ],
336  ],
337  'Finds foo, baz and blupp with no folder' => [
338  'title',
339  null,
340  true,
341  [],
342  [
343  '/baz/bla/baz.txt',
344  '/bar/blupp.txt',
345  '/bar/bla/foo.txt',
346  ],
347  ],
348  'Finds nothing for not existing' => [
349  'baz',
350  '/bar/',
351  true,
352  [],
353  [],
354  ],
355  'Finds nothing in root, when not recursive' => [
356  'title',
357  '/',
358  false,
359  [],
360  [],
361  ],
362  'Finds nothing, when not recursive and no folder given' => [
363  'title',
364  null,
365  false,
366  [],
367  [],
368  ],
369  'Filter is applied to result' => [
370  'title',
371  null,
372  true,
373  [
374  function ($itemName) {
375  return strpos($itemName, 'blupp') !== false ? true : -1;
376  }
377  ],
378  [
379  '/bar/blupp.txt',
380  ],
381  ],
382  ];
383  }
384 
395  public function ‪searchFilesFindsFilesInFolder(string $searchTerm, ?string $searchFolder, bool $recursive, array $filters, array $expectedIdentifiers)
396  {
397  try {
398  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
399  $this->importDataSet(__DIR__ . '/Fixtures/FileSearch.xml');
400  $this->setUpBackendUserFromFixture(1);
401  $subject = (new ‪StorageRepository())->findByUid(1);
402  $subject->setFileAndFolderNameFilters($filters);
403 
406  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/bar/bla/foo.txt', 'myData');
407  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/baz/bla/baz.txt', 'myData');
408  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/bar/blupp.txt', 'myData');
409  clearstatcache();
410 
411  $folder = $searchFolder ? GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:' . $searchFolder) : null;
412  $search = ‪FileSearchDemand::createForSearchTerm($searchTerm);
413  if ($recursive) {
414  $search = $search->withRecursive();
415  }
416 
417  $result = $subject->searchFiles($search, $folder);
418  $expectedFiles = array_map([$subject, 'getFile'], $expectedIdentifiers);
419  self::assertSame($expectedFiles, iterator_to_array($result));
420 
421  // Check if search also works for non hierarchical storages/drivers
422  // This is a hack, as capabilities is not settable from the outside
423  $objectReflection = new \ReflectionObject($subject);
424  $property = $objectReflection->getProperty('capabilities');
425  $property->setAccessible(true);
426  $property->setValue('capabilities', $subject->getCapabilities() & 7);
427  $result = $subject->searchFiles($search, $folder);
428  $expectedFiles = array_map([$subject, 'getFile'], $expectedIdentifiers);
429  self::assertSame($expectedFiles, iterator_to_array($result));
430  } finally {
431  ‪GeneralUtility::rmdir(‪Environment::getPublicPath() . '/fileadmin/bar', true);
432  ‪GeneralUtility::rmdir(‪Environment::getPublicPath() . '/fileadmin/baz', true);
433  }
434  }
435 
440  {
442  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
443  $this->setUpBackendUserFromFixture(1);
444  $subject = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1);
445 
447  $folderToCopy = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/foo');
448  $targetParentFolder = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/');
449 
450  $this->expectException(InvalidTargetFolderException::class);
451  $this->expectExceptionCode(1422723059);
452  $subject->copyFolder($folderToCopy, $targetParentFolder, null, $conflictMode);
453  }
454 
459  {
461  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
462  $this->setUpBackendUserFromFixture(1);
463  $subject = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1);
464 
466  $folderToCopy = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/foo');
467  $targetParentFolder = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/');
468 
469  $subject->copyFolder($folderToCopy, $targetParentFolder, null, $conflictMode);
470 
471  $newFolder = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/foo_01');
472  self::assertInstanceOf(Folder::class, $newFolder);
473  }
474 
479  {
481  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
482  $this->setUpBackendUserFromFixture(1);
484  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt', 'Temp file 1');
485  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/bar.txt', 'Temp file 2');
486 
487  $subject = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1);
488 
489  $fileToCopy = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/foo/bar.txt');
490  $targetParentFolder = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/');
491 
492  $this->expectException(ExistingTargetFileNameException::class);
493  $this->expectExceptionCode(1320291064);
494  $subject->copyFile($fileToCopy, $targetParentFolder, null, $conflictMode);
495  }
496 
501  {
503  $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
504  $this->setUpBackendUserFromFixture(1);
506  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/foo/bar.txt', 'Temp file 1');
507  file_put_contents(‪Environment::getPublicPath() . '/fileadmin/bar.txt', 'Temp file 2');
508 
509  $subject = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1);
510 
511  $fileToCopy = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/foo/bar.txt');
512  $targetParentFolder = GeneralUtility::makeInstance(ResourceFactory::class)->getFolderObjectFromCombinedIdentifier('1:/');
513 
514  $subject->copyFile($fileToCopy, $targetParentFolder, null, $conflictMode);
515 
516  $newFile = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObjectFromCombinedIdentifier('1:/bar_01.txt');
517  self::assertInstanceOf(File::class, $newFile);
518  }
519 }
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\deleteFileUnlinksFileIfNoRecyclerFolderAvailable
‪deleteFileUnlinksFileIfNoRecyclerFolderAvailable()
Definition: ResourceStorageTest.php:247
‪TYPO3\CMS\Core\Resource\DuplicationBehavior
Definition: DuplicationBehavior.php:24
‪TYPO3\CMS\Core\Core\Environment\getPublicPath
‪static string getPublicPath()
Definition: Environment.php:180
‪TYPO3\CMS\Core\Resource\DuplicationBehavior\CANCEL
‪const CANCEL
Definition: DuplicationBehavior.php:46
‪TYPO3\CMS\Core\Resource\ResourceStorage\PROCESSING_FOLDER_LEVELS
‪const PROCESSING_FOLDER_LEVELS
Definition: ResourceStorage.php:207
‪TYPO3\CMS\Core\Tests\Functional\Resource
Definition: ResourceFactoryTest.php:18
‪TYPO3\CMS\Core\Resource\FolderInterface\ROLE_DEFAULT
‪const ROLE_DEFAULT
Definition: FolderInterface.php:26
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\createFolderThrowsExceptionIfParentFolderDoesNotExist
‪createFolderThrowsExceptionIfParentFolderDoesNotExist()
Definition: ResourceStorageTest.php:212
‪TYPO3\CMS\Core\Resource\Exception\ExistingTargetFileNameException
Definition: ExistingTargetFileNameException.php:24
‪TYPO3\CMS\Core\Resource\Exception\InvalidTargetFolderException
Definition: InvalidTargetFolderException.php:24
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\copyFolderGeneratesNewFolderNameWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsRename
‪copyFolderGeneratesNewFolderNameWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsRename()
Definition: ResourceStorageTest.php:458
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\tearDown
‪tearDown()
Definition: ResourceStorageTest.php:38
‪TYPO3\CMS\Core\Type\Enumeration\cast
‪static static cast($value)
Definition: Enumeration.php:186
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\copyFileThrowsErrorWhenFileWithSameNameAlreadyExistsInTargetFolderAndConflictModeIsCancel
‪copyFileThrowsErrorWhenFileWithSameNameAlreadyExistsInTargetFolderAndConflictModeIsCancel()
Definition: ResourceStorageTest.php:478
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep($directory)
Definition: GeneralUtility.php:2022
‪TYPO3\CMS\Core\Resource\Search\FileSearchDemand
Definition: FileSearchDemand.php:26
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\searchFilesFindsFilesInFolder
‪searchFilesFindsFilesInFolder(string $searchTerm, ?string $searchFolder, bool $recursive, array $filters, array $expectedIdentifiers)
Definition: ResourceStorageTest.php:395
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:37
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪TYPO3\CMS\Core\Resource\StorageRepository
Definition: StorageRepository.php:31
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:24
‪TYPO3\CMS\Core\Resource\DuplicationBehavior\RENAME
‪const RENAME
Definition: DuplicationBehavior.php:32
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\isWithinFileMountBoundariesDataProvider
‪array isWithinFileMountBoundariesDataProvider()
Definition: ResourceStorageTest.php:111
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\isWithinFileMountBoundariesRespectsReadOnlyFileMounts
‪isWithinFileMountBoundariesRespectsReadOnlyFileMounts($targetDirectory, $fileMountFolder, $isFileMountReadOnly, $checkWriteAccess, $expectedResult)
Definition: ResourceStorageTest.php:86
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\copyFileGeneratesNewFileNameWhenFileAlreadyExistsInTargetFolderAndConflictModeIsRename
‪copyFileGeneratesNewFileNameWhenFileAlreadyExistsInTargetFolderAndConflictModeIsRename()
Definition: ResourceStorageTest.php:500
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\searchFilesFindsFilesInFolderDataProvider
‪searchFilesFindsFilesInFolderDataProvider()
Definition: ResourceStorageTest.php:263
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\getProcessingRootFolderTest
‪getProcessingRootFolderTest()
Definition: ResourceStorageTest.php:162
‪TYPO3\CMS\Core\Resource\ResourceStorage
Definition: ResourceStorage.php:122
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\replaceFileFailsIfLocalFileDoesNotExist
‪replaceFileFailsIfLocalFileDoesNotExist()
Definition: ResourceStorageTest.php:193
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest
Definition: ResourceStorageTest.php:37
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Core\Resource\FolderInterface
Definition: FolderInterface.php:22
‪TYPO3\CMS\Core\Utility\GeneralUtility\rmdir
‪static bool rmdir($path, $removeNonEmpty=false)
Definition: GeneralUtility.php:2075
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\deleteFileMovesFileToRecyclerFolderIfAvailable
‪deleteFileMovesFileToRecyclerFolderIfAvailable()
Definition: ResourceStorageTest.php:226
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Resource\Search\FileSearchDemand\createForSearchTerm
‪static createForSearchTerm(string $searchTerm)
Definition: FileSearchDemand.php:70
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\getRoleReturnsDefaultForRegularFolders
‪getRoleReturnsDefaultForRegularFolders()
Definition: ResourceStorageTest.php:176
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\getNestedProcessingFolderTest
‪getNestedProcessingFolderTest()
Definition: ResourceStorageTest.php:50
‪TYPO3\CMS\Core\Tests\Functional\Resource\ResourceStorageTest\copyFolderThrowsErrorWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsCancel
‪copyFolderThrowsErrorWhenFolderAlreadyExistsInTargetFolderAndConflictModeIsCancel()
Definition: ResourceStorageTest.php:439