Commit graph

5 commits

Author SHA1 Message Date
Aryeh Gregor
79fc95d39c Use MainConfigNames instead of string literals, #5
This should be the last of the usages in core, although I'm sure a few
are hiding somehow.

Change-Id: I7bf0b24bf23d3efb4c56a891830bbfe67945e899
2022-04-27 18:46:29 +03:00
Tim Starling
0dbcf3362b Use mock Guzzle client during tests
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
2022-01-18 13:14:51 +11:00
Kunal Mehta
f539b6f58c Support $wgLocalHTTPProxy in MultiHttpClient
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
2021-11-16 11:13:10 -08:00
daniel
78e2089140 PHPUnit tests: prevent real Guzzle requests from tests.
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
2020-10-26 23:03:36 +01:00
Daniel Kinzler
aea8cb17bd Re-apply: "PHPUnit: prevent HTTP requests"
This reverts commit c17ddfd786.

This time, also: Trying to get mock http to work in parser test

Bug: T262443
Change-Id: Id708cdfa3d3c27f30543c6bf212df96e6b0a69e1
2020-10-09 16:19:31 +02:00