diff --git a/typo3/sysext/impexp/Tests/Functional/Import/AbstractImportTestCase.php b/typo3/sysext/impexp/Tests/Functional/Import/AbstractImportTestCase.php index 2953267031fcb8f22ca7f2fcb4f489906370eaa5..d648eb8d14ddce388e3828881aba54fa5577d2ee 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/AbstractImportTestCase.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/AbstractImportTestCase.php @@ -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 diff --git a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItem/ImportInEmptyDatabaseTest.php b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItem/ImportInEmptyDatabaseTest.php index 9ccecf3f72d5aa02dc6a0e779161101f4ccb895e..1a0c9b2cbd1142451c48a1e999c084c9a90d108c 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItem/ImportInEmptyDatabaseTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItem/ImportInEmptyDatabaseTest.php @@ -61,6 +61,10 @@ class ImportInEmptyDatabaseTest extends \TYPO3\CMS\Impexp\Tests\Functional\Impor $this->assertFileEquals(__DIR__ . '/../../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'); $this->assertFileEquals(__DIR__ . '/../../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'); + + $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + } /** @@ -75,6 +79,9 @@ class ImportInEmptyDatabaseTest extends \TYPO3\CMS\Impexp\Tests\Functional\Impor $this->assertFileEquals(__DIR__ . '/../../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'); $this->assertFileEquals(__DIR__ . '/../../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'); + + $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; } } \ No newline at end of file