-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Allow defining test instance files copy for acceptance tests
Running acceptance tests with codeception on a created test instance with a real `Apache2` webserver requires to have the `.htaccess` files in place, otherwise the required rewriting to the endpoints will not work. Since TYPO3 v13 with droppend backend entrypoint this grows to a even higher requirement. TYPO3 monorepo implemented that directly within the extended `BackendEnvironment` class. To make the live for developers easier using the `typo3/testing-framework` for project or extension acceptance testing a new tooling is now added based on the direct monorepo implementation. Following `BackendEnvironment::$config[]` options are now available: * `'copyInstanceFiles' => [],` (`array<string, string[]>`) to copy the soureFile to all listed target paths. * `'copyInstanceFilesCreateTargetPath' => true,` to configure if target folders should be created when missing or throw a excetion. `BackendEnvironment` applies default files to copy based on available core extensions: * `EXT:backend` source.: 'typo3/sysext/backend/Resources/Public/Icons/favicon.ico' targets: - 'favicon.ico' * `EXT:install` source.: 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess' targets: - '.htaccess' source.: 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-temp-htaccess' targets: - 'fileadmin/_temp_/.htaccess' source.: 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-temp-index.html' targets: - 'fileadmin/_temp_/index.html' source.: 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/typo3temp-var-htaccess' targets: . 'typo3temp/var/.htaccess', That way, additional files could be defined and configured instead of implementing custom code in the extended class. Note that files are always provided, which does not hurt when not using `Apache2` as acceptance instance webserver. Releases: main, 8
- Loading branch information
Showing
2 changed files
with
265 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters