Skip to content
Snippets Groups Projects
Commit 8a402d2a authored by Marc Bastian Heinrichs's avatar Marc Bastian Heinrichs Committed by Wouter Wolters
Browse files

[TASK] FollowUp to add support for having files outside the t3d/xml

Fix functional tests.

Resolves: #57379
Change-Id: Iafbf4e2b7e68dd27b488f20141f34680f57bc9c4
Reviewed-on: https://review.typo3.org/30955
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
parent b242f0aa
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment