[CLEANUP] Move test file deletion into UnitTestCase class 59/31359/6
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 5 Jul 2014 16:58:34 +0000 (18:58 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 14 Sep 2014 11:25:42 +0000 (13:25 +0200)
commitc80f4fb242cd7f34f502a9f7999ce07263a075de
tree4e01d5addfc32ddccb5826c077fd4feb9f6b578f
parent7f16fe2d4d0b97e226fef717a2c69e89f793c8c5
[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>
18 files changed:
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Documentation/Changelog/master/Feature-60123-UnitTestCaseRemovesTestFiles.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/UnitTestCase.php
typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/InstallUtilityTest.php
typo3/sysext/indexed_search/Tests/Unit/IndexerTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/RootNodeTest.php