(dev/core#1412) E2E - Add test case for path+URL construction in CLI #15922
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In dev/core#1412, the regression involved CLI processes producing incorrect URLs. This adds some test-coverage.
Before
No test coverage for URLs in CLI environment.
After
There is some test-coverage. It's able to reveal the existence of the bug from 1412. (The test fails on WP without #15919, and it passes on WP with #15919.)
Comments
A lot of path/URL construction is dependent on the environment/site-build. The test does not, on its own, guarantee that all environments work. Rather, it adds a new slice of cheese to the stack.
This slice is moderately generic - in that I've successfully tested it localy on
drupal-demo
andwp-demo
builds. In theory, it should work on other build types (as long as they set variablesCIVI_CORE
,CMS_ROOT
,CMS_URL
).