diff --git a/typo3/sysext/impexp/Classes/Controller/ImportExportController.php b/typo3/sysext/impexp/Classes/Controller/ImportExportController.php index 423d2137f7b9910ca84c28d9a92444b1f7bd0cf1..30c2cc703b7b29f0907db27ddc47b2e685ab5917 100644 --- a/typo3/sysext/impexp/Classes/Controller/ImportExportController.php +++ b/typo3/sysext/impexp/Classes/Controller/ImportExportController.php @@ -269,7 +269,7 @@ class ImportExportController extends BaseScriptClass * Incoming array has syntax: * GETvar 'id' = import page id (must be readable) * - * file = (pointing to filename relative to PATH_site) + * file = pointing to filename relative to public web path * * [all relation fields are clear, but not files] * - page-tree is written first diff --git a/typo3/sysext/impexp/Classes/Export.php b/typo3/sysext/impexp/Classes/Export.php index 56de201903f984bca9e7266784158f80b4882390..df4c915df4642c06e503757879ff2707e99aa622 100644 --- a/typo3/sysext/impexp/Classes/Export.php +++ b/typo3/sysext/impexp/Classes/Export.php @@ -15,6 +15,7 @@ namespace TYPO3\CMS\Impexp; */ use TYPO3\CMS\Backend\Utility\BackendUtility; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Database\ReferenceIndex; use TYPO3\CMS\Core\Exception; use TYPO3\CMS\Core\Html\HtmlParser; @@ -354,7 +355,7 @@ class Export extends ImportExport if (isset($relation['type']) && $relation['type'] === 'file') { foreach ($relation['newValueFiles'] as $key => $fileRelationData) { $absoluteFilePath = $fileRelationData['ID_absFile']; - if (GeneralUtility::isFirstPartOfStr($absoluteFilePath, PATH_site)) { + if (GeneralUtility::isFirstPartOfStr($absoluteFilePath, Environment::getPublicPath())) { $relatedFilePath = PathUtility::stripPathSitePrefix($absoluteFilePath); $relations[$field]['newValueFiles'][$key]['ID'] = md5($relatedFilePath); } @@ -365,7 +366,7 @@ class Export extends ImportExport foreach ($relation['flexFormRels']['file'] as $key => $subList) { foreach ($subList as $subKey => $fileRelationData) { $absoluteFilePath = $fileRelationData['ID_absFile']; - if (GeneralUtility::isFirstPartOfStr($absoluteFilePath, PATH_site)) { + if (GeneralUtility::isFirstPartOfStr($absoluteFilePath, Environment::getPublicPath())) { $relatedFilePath = PathUtility::stripPathSitePrefix($absoluteFilePath); $relations[$field]['flexFormRels']['file'][$key][$subKey]['ID'] = md5($relatedFilePath); } @@ -589,7 +590,7 @@ class Export extends ImportExport foreach ($elements as $subKey => $el) { if ($el['subst']['type'] === 'file' && $this->includeSoftref($el['subst']['tokenID'])) { // Create abs path and ID for file: - $ID_absFile = GeneralUtility::getFileAbsFileName(PATH_site . $el['subst']['relFileName']); + $ID_absFile = GeneralUtility::getFileAbsFileName(Environment::getPublicPath() . '/' . $el['subst']['relFileName']); $ID = md5($el['subst']['relFileName']); if ($ID_absFile) { if (!$this->dat['files'][$ID]) { @@ -615,7 +616,7 @@ class Export extends ImportExport foreach ($elements as $subKey => $el) { if ($el['subst']['type'] === 'file' && $this->includeSoftref($el['subst']['tokenID'])) { // Create abs path and ID for file: - $ID_absFile = GeneralUtility::getFileAbsFileName(PATH_site . $el['subst']['relFileName']); + $ID_absFile = GeneralUtility::getFileAbsFileName(Environment::getPublicPath() . '/' . $el['subst']['relFileName']); $ID = md5($el['subst']['relFileName']); if ($ID_absFile) { if (!$this->dat['files'][$ID]) { @@ -787,7 +788,7 @@ class Export extends ImportExport if ($k % 2) { $EXTres_absPath = GeneralUtility::resolveBackPath(PathUtility::dirname($fI['ID_absFile']) . '/' . $v); $EXTres_absPath = GeneralUtility::getFileAbsFileName($EXTres_absPath); - if ($EXTres_absPath && GeneralUtility::isFirstPartOfStr($EXTres_absPath, PATH_site . $this->fileadminFolderName . '/') && @is_file($EXTres_absPath)) { + if ($EXTres_absPath && GeneralUtility::isFirstPartOfStr($EXTres_absPath, Environment::getPublicPath() . '/' . $this->fileadminFolderName . '/') && @is_file($EXTres_absPath)) { $htmlResourceCaptured = true; $EXTres_ID = md5($EXTres_absPath); $this->dat['header']['files'][$fI['ID']]['EXT_RES_ID'][] = $EXTres_ID; @@ -884,7 +885,7 @@ class Export extends ImportExport // Add file_ID key to header - slightly "risky" way of doing this because if the calculation // changes for the same value in $this->records[...] this will not work anymore! if ($el['subst'] && $el['subst']['relFileName']) { - $list[$lKey]['file_ID'] = md5(PATH_site . $el['subst']['relFileName']); + $list[$lKey]['file_ID'] = md5(Environment::getPublicPath() . '/' . $el['subst']['relFileName']); } } } @@ -900,7 +901,7 @@ class Export extends ImportExport // Add file_ID key to header - slightly "risky" way of doing this because if the calculation // changes for the same value in $this->records[...] this will not work anymore! if ($el['subst'] && $el['subst']['relFileName']) { - $list[$lKey]['file_ID'] = md5(PATH_site . $el['subst']['relFileName']); + $list[$lKey]['file_ID'] = md5(Environment::getPublicPath() . '/' . $el['subst']['relFileName']); } } } diff --git a/typo3/sysext/impexp/Classes/Import.php b/typo3/sysext/impexp/Classes/Import.php index e1c6622037f6f36e8a362a13482e6b74a77a5241..33cc459c6d5c8dbb667cdfc4d8ab3486a3c97cb7 100644 --- a/typo3/sysext/impexp/Classes/Import.php +++ b/typo3/sysext/impexp/Classes/Import.php @@ -16,6 +16,7 @@ namespace TYPO3\CMS\Impexp; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\DataHandling\DataHandler; use TYPO3\CMS\Core\Exception; @@ -956,7 +957,7 @@ class Import extends ImportExport public function unlinkTempFiles() { foreach ($this->unlinkFiles as $fileName) { - if (GeneralUtility::isFirstPartOfStr($fileName, PATH_site . 'typo3temp/')) { + if (GeneralUtility::isFirstPartOfStr($fileName, Environment::getPublicPath() . '/typo3temp/')) { GeneralUtility::unlink_tempfile($fileName); clearstatcache(); if (is_file($fileName)) { @@ -1434,11 +1435,11 @@ class Import extends ImportExport if ($rteOrigName && GeneralUtility::isFirstPartOfStr($dirPrefix, 'uploads/')) { // RTE: // First, find unique RTE file name: - if (@is_dir(PATH_site . $dirPrefix)) { + if (@is_dir(Environment::getPublicPath() . '/' . $dirPrefix)) { // From the "original" RTE filename, produce a new "original" destination filename which is unused. // Even if updated, the image should be unique. Currently the problem with this is that it leaves a lot of unused RTE images... $fileProcObj = $this->getFileProcObj(); - $origDestName = $fileProcObj->getUniqueName($rteOrigName, PATH_site . $dirPrefix); + $origDestName = $fileProcObj->getUniqueName($rteOrigName, Environment::getPublicPath() . '/' . $dirPrefix); // Create copy file name: $pI = pathinfo($relFileName); $copyDestName = PathUtility::dirname($origDestName) . '/RTEmagicC_' . substr(PathUtility::basename($origDestName), 10) . '.' . $pI['extension']; @@ -1459,7 +1460,7 @@ class Import extends ImportExport $this->error('ERROR: The destination filenames "' . $copyDestName . '" and "' . $origDestName . '" either existed or have non-valid names'); } } else { - $this->error('ERROR: "' . PATH_site . $dirPrefix . '" was not a directory, so could not process file "' . $relFileName . '"'); + $this->error('ERROR: "' . Environment::getPublicPath() . '/' . $dirPrefix . '" was not a directory, so could not process file "' . $relFileName . '"'); } } elseif (GeneralUtility::isFirstPartOfStr($dirPrefix, $this->fileadminFolderName . '/')) { // File in fileadmin/ folder: @@ -1476,7 +1477,7 @@ class Import extends ImportExport } else { $this->error('ERROR: Could not find file ID in header.'); } - // Return (new) filename relative to PATH_site: + // Return (new) filename relative to public web path return $relFileName; } @@ -1507,11 +1508,11 @@ class Import extends ImportExport // Write main file: if ($updMode) { - $newName = PATH_site . $dirPrefix . $fileName; + $newName = Environment::getPublicPath() . '/' . $dirPrefix . $fileName; } else { // Create unique filename: $fileProcObj = $this->getFileProcObj(); - $newName = $fileProcObj->getUniqueName($fileName, PATH_site . $dirPrefix); + $newName = $fileProcObj->getUniqueName($fileName, Environment::getPublicPath() . '/' . $dirPrefix); } if ($this->writeFileVerify($newName, $fileID)) { // If the resource was an HTML/CSS file with resources attached, we will write those as well! @@ -1524,9 +1525,9 @@ class Import extends ImportExport if ($this->dat['files'][$res_fileID]['filename']) { // Resolve original filename: $relResourceFileName = $this->dat['files'][$res_fileID]['parentRelFileName']; - $absResourceFileName = GeneralUtility::resolveBackPath(PATH_site . $origDirPrefix . $relResourceFileName); + $absResourceFileName = GeneralUtility::resolveBackPath(Environment::getPublicPath() . '/' . $origDirPrefix . $relResourceFileName); $absResourceFileName = GeneralUtility::getFileAbsFileName($absResourceFileName); - if ($absResourceFileName && GeneralUtility::isFirstPartOfStr($absResourceFileName, PATH_site . $this->fileadminFolderName . '/')) { + if ($absResourceFileName && GeneralUtility::isFirstPartOfStr($absResourceFileName, Environment::getPublicPath() . '/' . $this->fileadminFolderName . '/')) { $destDir = PathUtility::stripPathSitePrefix(PathUtility::dirname($absResourceFileName) . '/'); if ($this->verifyFolderAccess($destDir, true) && $this->checkOrCreateDir($destDir)) { $this->writeFileVerify($absResourceFileName, $res_fileID); @@ -1567,9 +1568,9 @@ class Import extends ImportExport } /** - * Writes a file from the import memory having $fileID to file name $fileName which must be an absolute path inside PATH_site + * Writes a file from the import memory having $fileID to file name $fileName which must be an absolute path inside public web path * - * @param string $fileName Absolute filename inside PATH_site to write to + * @param string $fileName Absolute filename inside public web path to write to * @param string $fileID File ID from import memory * @param bool $bypassMountCheck Bypasses the checking against filemounts - only for RTE files! * @return bool Returns TRUE if it went well. Notice that the content of the file is read again, and md5 from import memory is validated. @@ -1615,7 +1616,7 @@ class Import extends ImportExport /** * Returns TRUE if directory exists and if it doesn't it will create directory and return TRUE if that succeeded. * - * @param string $dirPrefix Directory to create. Having a trailing slash. Must be in fileadmin/. Relative to PATH_site + * @param string $dirPrefix Directory to create. Having a trailing slash. Must be in fileadmin/. Relative to public web path * @return bool TRUE, if directory exists (was created) */ public function checkOrCreateDir($dirPrefix) @@ -1628,8 +1629,8 @@ class Import extends ImportExport foreach ($filePathParts as $dirname) { $pathAcc .= '/' . $dirname; if (strlen($dirname)) { - if (!@is_dir(PATH_site . $this->fileadminFolderName . $pathAcc)) { - if (!GeneralUtility::mkdir(PATH_site . $this->fileadminFolderName . $pathAcc)) { + if (!@is_dir(Environment::getPublicPath() . '/' . $this->fileadminFolderName . $pathAcc)) { + if (!GeneralUtility::mkdir(Environment::getPublicPath() . '/' . $this->fileadminFolderName . $pathAcc)) { $this->error('ERROR: Directory could not be created....B'); return false; } diff --git a/typo3/sysext/impexp/Classes/ImportExport.php b/typo3/sysext/impexp/Classes/ImportExport.php index de6f79b1fa1a6a23b5f8a1b5b3f8a34b9af20ab5..242983cfa5e37b56a56977bf4ae64cb0c8ab3083 100644 --- a/typo3/sysext/impexp/Classes/ImportExport.php +++ b/typo3/sysext/impexp/Classes/ImportExport.php @@ -759,7 +759,7 @@ abstract class ImportExport } } // Check if file exists: - if (file_exists(PATH_site . $fI['relFileName'])) { + if (file_exists(Environment::getPublicPath() . '/' . $fI['relFileName'])) { if ($this->update) { $pInfo['updatePath'] .= 'File exists.'; } else { @@ -769,7 +769,7 @@ abstract class ImportExport // Check extension: $fileProcObj = $this->getFileProcObj(); if ($fileProcObj->actionPerms['addFile']) { - $testFI = GeneralUtility::split_fileref(PATH_site . $fI['relFileName']); + $testFI = GeneralUtility::split_fileref(Environment::getPublicPath() . '/' . $fI['relFileName']); if (!$this->allowPHPScripts && !$fileProcObj->checkIfAllowed($testFI['fileext'], $testFI['path'], $testFI['file'])) { $pInfo['msg'] .= 'File extension was not allowed!'; } @@ -916,16 +916,16 @@ abstract class ImportExport } /** - * Verifies that the input path (relative to PATH_site) is found in the backend users filemounts. + * Verifies that the input path relative to public web path is found in the backend users filemounts. * If it doesn't it will try to find another relative filemount for the user and return an alternative path prefix for the file. * - * @param string $dirPrefix Path relative to PATH_site + * @param string $dirPrefix Path relative to public web path * @param bool $noAlternative If set, Do not look for alternative path! Just return FALSE * @return string|bool If a path is available that will be returned, otherwise FALSE. */ public function verifyFolderAccess($dirPrefix, $noAlternative = false) { - // Check the absolute path for PATH_site, if the user has access - no problem + // Check the absolute path for public web path, if the user has access - no problem try { ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($dirPrefix); return $dirPrefix; diff --git a/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemInFlexFormTest.php b/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemInFlexFormTest.php index 10efa2dbd0f2fc542c97dd1c0398f6701684c35d..0721b2670ce6e5a548f455e2e6fc266e98ec74b6 100644 --- a/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemInFlexFormTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemInFlexFormTest.php @@ -15,6 +15,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Export; */ use TYPO3\CMS\Backend\Utility\BackendUtility; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Export; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -123,12 +124,10 @@ class GroupFileAndFileReferenceItemInFlexFormTest extends AbstractImportExportTe } } - // hacky, but the timestamp will change on every clone, so set the file - // modification timestamp to the asserted value - $success = @touch(PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg', 1393866824); - if (!$success) { - $this->markTestSkipped('Could not set file modification timestamp for a fixture binary file. This is required for running the test successful.'); - } + // Hacky, but the timestamp will change on every clone, so set the file modification timestamp to the asserted value + $success = touch(Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg', 1393866824); + // Early fail if touching failed - indicates a broken functional test setup + $this->assertTrue($success, 'Could not set file modification timestamp for a fixture binary file.'); $subject->export_addFilesFromRelations(); $subject->export_addFilesFromSysFilesRecords(); diff --git a/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemTest.php b/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemTest.php index 7ae4380f36a835449a017cf1b05c7c1725c2276c..78da539fcef375a996ccd05d2925c84a1188e1d0 100644 --- a/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Export/GroupFileAndFileReferenceItemTest.php @@ -15,6 +15,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Export; */ use TYPO3\CMS\Backend\Utility\BackendUtility; +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Export; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -163,12 +164,10 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase } } - // hacky, but the timestamp will change on every clone, so set the file - // modification timestamp to the asserted value - $success = @touch(PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg', 1393866824); - if (!$success) { - $this->markTestSkipped('Could not set file modification timestamp for a fixture binary file. This is required for running the test successful.'); - } + // Hacky, but the timestamp will change on every clone, so set the file modification timestamp to the asserted value + $success = touch(Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg', 1393866824); + // Early fail if touching failed - indicates a broken functional test setup + $this->assertTrue($success, 'Could not set file modification timestamp for a fixture binary file.'); $subject->export_addFilesFromRelations(); $subject->export_addFilesFromSysFilesRecords(); diff --git a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemInFlexFormTest.php b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemInFlexFormTest.php index 2b6547bc4f5045414242cc90a68d9dfa6e38ccf8..36c7757825f9887e8088e9382853394681e94a52 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemInFlexFormTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemInFlexFormTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -51,14 +52,14 @@ class GroupFileAndFileReferenceItemInFlexFormTest extends AbstractImportExportTe ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; - $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItemInFlexForm.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'); - $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->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); } } diff --git a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemTest.php b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemTest.php index 7e4722a3b14678f3703bf5599ee3776406a4c1fc..f41bbd4019cf24e1b3e636be718e3ea7d74fe19d 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/GroupFileAndFileReferenceItemTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -51,13 +52,13 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; - $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItem.csv'); - $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->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); } /** @@ -76,13 +77,13 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; - $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItemWithRootLevelOnlyAllowed.csv'); - $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->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); } /** @@ -101,12 +102,12 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItemWithRootLevelNotAllowed.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'); - $this->assertFileNotExists(PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileNotExists(Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); $expectedErrors = [ 'Error: Record type tx_impexpgroupfiles_item is not allowed on pid 0' @@ -131,13 +132,13 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; - $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItemWithRootLevelAndPagesAllowed.csv'); - $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->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); } /** @@ -154,12 +155,12 @@ class GroupFileAndFileReferenceItemTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image5.jpg'; - $this->testFilesToDelete[] = PATH_site . 'uploads/tx_impexpgroupfiles/typo3_image4.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importGroupFileAndFileReferenceItem.csv'); - $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->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image5.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image5.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/uploads/tx_impexpgroupfiles/typo3_image4.jpg', Environment::getPublicPath() . '/uploads/tx_impexpgroupfiles/typo3_image4.jpg'); } } diff --git a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentTest.php b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentTest.php index 914c09ac5b98ac5897c9e104bca275e8c7276756..3ea7adef1474d2864af07157c941b544c908a452 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -37,11 +38,11 @@ class PagesAndTtContentTest extends AbstractImportExportTestCase ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContent.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Extensions/template_extension/Resources/Public/Templates/Empty.html', PATH_site . 'typo3conf/ext/template_extension/Resources/Public/Templates/Empty.html'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Extensions/template_extension/Resources/Public/Templates/Empty.html', Environment::getPublicPath() . '/typo3conf/ext/template_extension/Resources/Public/Templates/Empty.html'); } } diff --git a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php index f881fdbd4c9021a34d81723a27ed029bcf31ca7c..c0421446b7bb6716245a9fcab3364577f63a8034 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInEmptyDatabaseTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -41,11 +42,11 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesOnCaseSensitiveFilesystems.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -66,11 +67,11 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesOnCaseInsensitiveFilesystems.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -91,11 +92,11 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesButWithoutStorageOnCaseSensitiveFilesystems.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -116,11 +117,11 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesButWithoutStorageOnCaseInsensitiveFilesystems.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -137,13 +138,13 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/folder_with_spaces/typo3_image2.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/folder_with_spaces/typo3_image3.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/folder_with_spaces/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/folder_with_spaces/typo3_image3.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesWithSpacesInPath.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/folder_with_spaces/typo3_image2.jpg'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', PATH_site . 'fileadmin/user_upload/folder_with_spaces/typo3_image3.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/folder_with_spaces/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/folder_with_spaces/typo3_image3.jpg'); } /** @@ -156,16 +157,16 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor $subject->loadFile( // Files are parallel to the fixture .xml file in a folder - impexp tests for /../ not allowed in path, so we set an absolute path here - PATH_site . 'typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image-but-not-included.xml', + Environment::getPublicPath() . '/typo3/sysext/impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-image-but-not-included.xml', 1 ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImagesButNotIncluded.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -184,11 +185,11 @@ class PagesAndTtContentWithImagesInEmptyDatabaseTest extends AbstractImportExpor $subject->force_all_UIDS = true; $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithImageWithForcedUids.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); $expectedErrors = [ 'Forcing uids of sys_file records is not supported! They will be imported as new records!' diff --git a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInFilledDatabaseTest.php b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInFilledDatabaseTest.php index 75d8fcc4e8f7653f3ae2bd53daab34bd358bb982..42776bada92595b6a7702695b1115af3dff8cb01 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInFilledDatabaseTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImagesInFilledDatabaseTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -59,13 +60,13 @@ class PagesAndTtContentWithImagesInFilledDatabaseTest extends AbstractImportExpo ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2_01.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2_01.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithDifferentImageToExistingData.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/FileAssertions/typo3_image2_01.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2_01.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/FileAssertions/typo3_image2_01.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2_01.jpg'); } /** @@ -90,11 +91,11 @@ class PagesAndTtContentWithImagesInFilledDatabaseTest extends AbstractImportExpo ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithSameImageToExistingData.csv'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); } /** @@ -138,9 +139,9 @@ class PagesAndTtContentWithImagesInFilledDatabaseTest extends AbstractImportExpo ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/used-1.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/used-2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/used-1.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/used-2.jpg'; // Expect mapping is updated: one content element should still reference new sys_file:2, // two others should reference new sys_file:3 diff --git a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithRteImagesAndFileLinkTest.php b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithRteImagesAndFileLinkTest.php index 13950337f5efdec4c9f8c3c4b051e16dad921454..333c8f8344e2fae410e3c8eba7d9af6b457413ea 100644 --- a/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithRteImagesAndFileLinkTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithRteImagesAndFileLinkTest.php @@ -14,6 +14,7 @@ namespace TYPO3\CMS\Impexp\Tests\Functional\Import; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Impexp\Import; use TYPO3\CMS\Impexp\Tests\Functional\AbstractImportExportTestCase; @@ -44,14 +45,14 @@ class PagesAndTtContentWithRteImagesAndFileLinkTest extends AbstractImportExport ); $subject->importData(0); - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'; - $this->testFilesToDelete[] = PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'; + $this->testFilesToDelete[] = Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'; $this->assertCSVDataSet('EXT:impexp/Tests/Functional/Fixtures/DatabaseAssertions/importPagesAndRelatedTtContentWithRteImagesAndFileLink.csv'); - $this->assertFileNotExists(PATH_site . 'fileadmin/_processed_/csm_typo3_image2_5c2670fd59.jpg'); + $this->assertFileNotExists(Environment::getPublicPath() . '/fileadmin/_processed_/csm_typo3_image2_5c2670fd59.jpg'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', PATH_site . 'fileadmin/user_upload/typo3_image2.jpg'); - $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', PATH_site . 'fileadmin/user_upload/typo3_image3.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image2.jpg'); + $this->assertFileEquals(__DIR__ . '/../Fixtures/Folders/fileadmin/user_upload/typo3_image3.jpg', Environment::getPublicPath() . '/fileadmin/user_upload/typo3_image3.jpg'); } }