Unify test file removal
Some tests create files or directories in the filesystem. Unify the removal handling after tests are done to make sure the cleanup is complete.
[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.
Reviewed-by: Helmut Hummel <email@example.com>
Tested-by: Helmut Hummel <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>