Instead of failing when createGuzzleClient() is called, return a mock
which fails when a request is actually dispatched, following the
suggestion of the comment.
Otherwise PHPUnit fails to start up when RemoteIcuCollation and Shellbox
are configured.
Change-Id: Iac8d1e73512e7073264e79bbef8e4fa02fedefe2
This follows the same approach as MWHttpRequest, we inject
$wgLocalVirtualHosts, and for each request check whether it matches that
domain list, rewriting the request as necessary.
Unfortunately this requires a decent amount of code duplication because
MultiHttpClient is in includes/libs/ and can't depend on the same code
in MWHttpRequest.
Bug: T288848
Change-Id: Ia16d8f86b1cb20dde9fe487729d67d92af650cfe
Per I1702c11928f8760, tests should fail when trying to make a
HTTP request, unless they have explicitely defined the desired
response.
This patch implements the same behavior for the newly introduced
createGuzzleClient() method.
Bug: T263816
Bug: T262443
Change-Id: Ie3c2efb1387ecc5bc29ff1749cae4bb33e636e9f
This reverts commit c17ddfd786.
This time, also: Trying to get mock http to work in parser test
Bug: T262443
Change-Id: Id708cdfa3d3c27f30543c6bf212df96e6b0a69e1