‪TYPO3CMS  10.4
FolderStructureTestCase.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 
18 use org\bovigo\vfs\vfsStream;
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
26 abstract class ‪FolderStructureTestCase extends UnitTestCase
27 {
34  protected function ‪getVirtualTestDir($prefix = 'root_')
35  {
36  $root = vfsStream::setup();
37  $path = $root->url() . '/typo3temp/var/tests/' . ‪StringUtility::getUniqueId($prefix);
39  return $path;
40  }
41 
48  protected function ‪getVirtualTestFilePath($prefix = 'file_')
49  {
50  return $this->‪getVirtualTestDir() . '/' . ‪StringUtility::getUniqueId($prefix);
51  }
52 }
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestDir
‪string getVirtualTestDir($prefix='root_')
Definition: FolderStructureTestCase.php:34
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep($directory)
Definition: GeneralUtility.php:2022
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Install\Tests\Unit
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase
Definition: FolderStructureTestCase.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestFilePath
‪string getVirtualTestFilePath($prefix='file_')
Definition: FolderStructureTestCase.php:48