(dev/core#1412) E2E - Add test case for path+URL construction in CLI
authorTim Otten <totten@civicrm.org>
Thu, 21 Nov 2019 21:58:38 +0000 (13:58 -0800)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 22 Nov 2019 01:08:58 +0000 (12:08 +1100)
commit0d8d5740b1f8b782e7da77ecf9ebd865e62d5629
tree51043b5048fe11103a5c0a462304d909e355c51c
parent249fb55b054a38737a1bf8d873e093dc9bcc23b1
(dev/core#1412) E2E - Add test case for path+URL construction in CLI

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.

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` and `wp-demo` builds.  In theory, it should work on
other build types (as long as they set variables `CIVI_CORE`, `CMS_ROOT`,
`CMS_URL`).
tests/phpunit/E2E/Extern/CliRunnerTest.php [new file with mode: 0644]