Prior to 3de744597e, it was possible to pass `null` for $options.
Restore that by setting the default type to be null, and explicitly
document that null is a supported value in the doc block.
Also update the signature of MWHttpRequestTester to match.
Change-Id: I74d586afa5527e0a30ea99f3989f4dd12fa9fea1
These tests apply to things that are not relevant to PHP code coverage,
such as testing presence of messages, JSON files, or the PHPUnit tests
themselves.
Using @coversNothing indicates that there is no code here to be covered,
and prevents warnings when using --strict-coverage mode (T152923).
Change-Id: Id89ee2c15a3ce3f10e34b13fb677cd1af75af9e6
* 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