Clean up http classes a bit
authorGergő Tisza <tgr.huwiki@gmail.com>
Wed, 26 Oct 2016 04:08:14 +0000 (21:08 -0700)
committerGergő Tisza <tgr.huwiki@gmail.com>
Thu, 1 Dec 2016 03:00:44 +0000 (19:00 -0800)
commit1531659d252cd85c6f625a79c7e1f6e5f847fe3f
treee8d7cbdc6263d02f5956b78f1ba66a293959b61a
parentde623cbbc47cf9d0ac25847e52a04d49bf380026
Clean up http classes a bit

* 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
12 files changed:
RELEASE-NOTES-1.29
includes/http/CurlHttpRequest.php
includes/http/Http.php
includes/http/MWHttpRequest.php
includes/http/PhpHttpRequest.php
includes/libs/CookieJar.php
tests/common/TestsAutoLoader.php
tests/integration/includes/http/CurlHttpRequestTest.php [new file with mode: 0644]
tests/integration/includes/http/MWHttpRequestTestCase.php [new file with mode: 0644]
tests/integration/includes/http/PhpHttpRequestTest.php [new file with mode: 0644]
tests/phpunit/includes/HttpTest.php [deleted file]
tests/phpunit/includes/http/HttpTest.php [new file with mode: 0644]