CRM_Utils_StringTest - Fix false-negative on systems with non-standard HTTP port
authorTim Otten <totten@civicrm.org>
Thu, 6 Sep 2018 04:56:01 +0000 (23:56 -0500)
committerTim Otten <totten@civicrm.org>
Tue, 11 Sep 2018 00:19:54 +0000 (17:19 -0700)
commit57530e5612bca013d692745617bf0a270fd847e7
tree3a6e30aaa4d7eda08a140bc96c8cb9e5c922dd4c
parent2286f0e9a82196bf3ad49bd4de6a2a69b1423577
CRM_Utils_StringTest - Fix false-negative on systems with non-standard HTTP port

Before
------

On a local build with the base URL `http://dmaster.bknix:8001`, the test
`testSimplifyURL()` fails because the actual URL includes `:8001`.  The
actual URL is correct, but the test expectation is wrong.

After
-----

The test passes.

Comments
--------

* In the continuous-integration server, we've traditionally tested with
  the default/blank port (`http://core-1234-1234.test-ubu1204-5.civicrm.org`), so
  this didn't come up.
* The formatt returned by `simpleParseUrl()`  in `host+port` is clever about colons.
  It has unit-test coverage to show this.
tests/phpunit/CRM/Utils/StringTest.php