* Complete coverage for Http::getProxy().
* Remove bogus @covers tag on data provider, and add the
relevant MWHttpRequest::getFinalUrl to the test instead.
* Convert test to use dataProvider and add missing test cases
to increase getFinalUrl() test coverage to 100%.
* Minor clean up in getFinalUrl to consistently use early-return
for all cases, not just for relative 'domain' and 'isset-host'
cases. Without this coverage actually couldn't reach 100% due
to the remainder of the empty else branch never being reached
(CRAP: "Redundant 'else' after 'return'")
Change-Id: I775d95965dc23a1e6c4c62ed84f9da64b6c72135
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I46261416f7603558dceb76ebe695a5cac274e417
* added integration tests. We probably don't want automated tests
to make external requests but these make manual testing more
convenient. Documented some oddities discovered by testing.
* made ::$status, ::proxySetup() and ::getHeaderList()
protected; they were not referenced in any gerrit-hosted extension
and they provide no useful functionality to external callers.
Similarly, marked ::read() and ::errorHandler() as internal
(these are used as callbacks so can't be protected)
* removed inheritance abuse in ::execute()
* documented ::execute() as returning a StatusValue (but
keep returning a Status for now)
* changed setCookie argument defaults to ones that make sense
* replaced MWException
* moved unit tests to the correct location
* fixed some code style issues
Change-Id: I5852fc75badc5d475ae30ec2c9376bde7024bd95
2016-11-30 19:00:44 -08:00
Renamed from tests/phpunit/includes/HttpTest.php (Browse further)