[TASK] FollowUp to add support for having files outside the t3d/xml
[Packages/TYPO3.CMS.git] / typo3 / sysext / impexp / Tests / Functional / Import / AbstractImportTestCase.php
index 2953267..d648eb8 100644 (file)
@@ -44,8 +44,15 @@ abstract class AbstractImportTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
        protected $import;
 
        /**
-        * Set up for set up the backend user, initialize the language object
-        * and creating the ImportExport instance
+        * Absolute path to files that must be removed
+        * after a test - handled in tearDown
+        *
+        * @var array
+        */
+       protected $testFilesToDelete = array();
+
+       /**
+        * Set up for initialization of the ImportExport instance
         *
         * @return void
         */
@@ -56,6 +63,17 @@ abstract class AbstractImportTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
                $this->import->init(0, 'import');
        }
 
+       /**
+        * Tear down for remove of the test files
+        */
+       public function tearDown() {
+               foreach ($this->testFilesToDelete as $absoluteFileName) {
+                       if (@is_file($absoluteFileName)) {
+                               unlink($absoluteFileName);
+                       }
+               }
+               parent::tearDown();
+       }
 
        /**
         * Test if the local filesystem is case sensitive