Problem/Motivation
While working on #3361747: Add test trait to create randomly named, non-conflicting default target modules I realized that the machine name and directory of the default target module is hard coded and so can't be specified ahead of time for a test. This is a problem because TargetModuleCollection::ensureDefaultTargetModuleIsSet() is an all or nothing situation, where it won't do anything if a default target module is already installed, and if one is not installed, it will create it all and install it with the hard coded name, without giving us a chance to provide a different module name or path.
Steps to reproduce
Am tired. Please see #3361747: Add test trait to create randomly named, non-conflicting default target modules for details.
Proposed resolution
Add optional parameters to TargetModuleCollection::ensureDefaultTargetModuleIsSet()
Remaining tasks
See above.
User interface changes
None.
API changes
None other than optional parameters TargetModuleCollection::ensureDefaultTargetModuleIsSet()
Data model changes
None I think?
Issue fork config_enforce_devel-3362011
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3362011-set-default-target-module-name-and-path
changes, plain diff MR !24
Comments
Comment #3
ambient.impactOpened a draft merge request. I think it probably should have a basic test added before it's marked as ready.
Comment #4
ambient.impactWhoops.
Comment #5
ambient.impactTest for this is included in #3362018: Refactor DefaultTargetModuleTest to use/test DefaultTargetModuleSetUpTrait and TargetModuleCollection::ensureDefaultTargetModuleIsSet() parameters so marked as ready and needs review.
Comment #6
star-szrMerged to 2.0.x, thanks!