‪TYPO3CMS  10.4
Typo3tempFileServiceTest.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 
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
26 class ‪Typo3tempFileServiceTest extends UnitTestCase
27 {
32  {
33  $this->expectException(\RuntimeException::class);
34  $this->expectExceptionCode(1501781453);
35  $processedFileRepository = $this->prophesize(ProcessedFileRepository::class);
36  $storageRepository = $this->prophesize(StorageRepository::class);
37  $subject = new ‪Typo3tempFileService($processedFileRepository->reveal(), $storageRepository->reveal());
38  $subject->clearAssetsFolder('../foo');
39  }
40 
45  {
46  $this->expectException(\RuntimeException::class);
47  $this->expectExceptionCode(1501781453);
48  $processedFileRepository = $this->prophesize(ProcessedFileRepository::class);
49  $storageRepository = $this->prophesize(StorageRepository::class);
50  $subject = new ‪Typo3tempFileService($processedFileRepository->reveal(), $storageRepository->reveal());
51  $subject->clearAssetsFolder('typo3temp/foo');
52  }
53 }
‪TYPO3\CMS\Core\Resource\ProcessedFileRepository
Definition: ProcessedFileRepository.php:30
‪TYPO3\CMS\Install\Service\Typo3tempFileService
Definition: Typo3tempFileService.php:32
‪TYPO3\CMS\Install\Tests\Unit\Service\Typo3tempFileServiceTest\clearAssetsFolderThrowsIfPathDoesNotStartWithTypotempAssets
‪clearAssetsFolderThrowsIfPathDoesNotStartWithTypotempAssets()
Definition: Typo3tempFileServiceTest.php:44
‪TYPO3\CMS\Install\Tests\Unit\Service\Typo3tempFileServiceTest\clearAssetsFolderThrowsWithInvalidPath
‪clearAssetsFolderThrowsWithInvalidPath()
Definition: Typo3tempFileServiceTest.php:31
‪TYPO3\CMS\Core\Resource\StorageRepository
Definition: StorageRepository.php:31
‪TYPO3\CMS\Install\Tests\Unit\Service\Typo3tempFileServiceTest
Definition: Typo3tempFileServiceTest.php:27
‪TYPO3\CMS\Install\Tests\Unit\Service
Definition: ClearTableServiceTest.php:16