[CLEANUP] Move test file deletion into UnitTestCase class
In order to unify removal of files and directories created by unit tests, the basic UnitTestCase class get a property to register created files and directories. Removing those files is implemented in tearDown(). Tests now just need to add created files to $this->testFilesToDelete to get the automatically cleaned up after test run. The method is constructed to only remove stuff within typo3conf/ext and typo3temp to reduce the risk of removing too, it throws an exception if this rule is not followed. Change-Id: Ibca2b3a006432f2335fff8f0b0c05c62e363878c Resolves: #60123 Releases: 6.3 Reviewed-on: http://review.typo3.org/31359 Reviewed-by:Helmut Hummel <helmut.hummel@typo3.org> Tested-by:
Helmut Hummel <helmut.hummel@typo3.org> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php 1 addition, 1 deletiontypo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php
- typo3/sysext/core/Classes/Utility/GeneralUtility.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Utility/GeneralUtility.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-60123-UnitTestCaseRemovesTestFiles.rst 17 additions, 0 deletions...log/master/Feature-60123-UnitTestCaseRemovesTestFiles.rst
- typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php 1 addition, 16 deletions...ore/Tests/Unit/Configuration/ConfigurationManagerTest.php
- typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php 1 addition, 0 deletions...ysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
- typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php 0 additions, 7 deletions...sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php
- typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php 2 additions, 17 deletions...ore/Tests/Unit/Utility/ExtensionManagementUtilityTest.php
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php 18 additions, 16 deletionstypo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
- typo3/sysext/core/Tests/UnitTestCase.php 37 additions, 0 deletionstypo3/sysext/core/Tests/UnitTestCase.php
- typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php 1 addition, 17 deletions...ysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php
- typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php 25 additions, 36 deletions...ionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php
- typo3/sysext/extensionmanager/Tests/Unit/Utility/InstallUtilityTest.php 2 additions, 2 deletions...xtensionmanager/Tests/Unit/Utility/InstallUtilityTest.php
- typo3/sysext/indexed_search/Tests/Unit/IndexerTest.php 4 additions, 20 deletionstypo3/sysext/indexed_search/Tests/Unit/IndexerTest.php
- typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php 7 additions, 24 deletions...t/install/Tests/Unit/FolderStructure/AbstractNodeTest.php
- typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php 11 additions, 28 deletions.../install/Tests/Unit/FolderStructure/DirectoryNodeTest.php
- typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php 20 additions, 37 deletions...ysext/install/Tests/Unit/FolderStructure/FileNodeTest.php
- typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php 4 additions, 21 deletions...ysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php
- typo3/sysext/install/Tests/Unit/FolderStructure/RootNodeTest.php 2 additions, 19 deletions...ysext/install/Tests/Unit/FolderStructure/RootNodeTest.php
Please register or sign in to comment