Commit graph

3 commits

Author SHA1 Message Date
Piotr Miazga
fbbe0ca2d9 shellbox: Use Telemetry class instead of WebRequest::getRequestId()
ShellboxClientFactory should depend upon HttpRequestFactory to provide
a fully initialized HTTP Client. It shouldn't handle things like
`X-Request-Id` as it's HTTP layer responsibility. More over the
`WebRequest::getRequestId()` got deprecated in favour of Telemetry class.

Bug: T346209
Change-Id: If7630f81be4d7ca94ab0cac02b2a30126e3a297d
2023-09-19 14:00:25 +02:00
Amir Sarabadani
f4e68e055f Reorg: Move Status to MediaWiki\Status\
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.

Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
2023-08-25 15:44:17 +02:00
Daimona Eaytoy
ed26774004 phpunit: Disallow access to MediaWikiServices in unit tests
Unit tests should never access the global service locator, as that's a
pretty evident sign that the test isn't testing something in isolation.

HttpRequestFactoryTest fails with this restriction, because it uses
the UrlUtils service for parsing URLs. Make it an integration test and
add a TODO about injecting UrlUtils.

Bug: T227900
Change-Id: I5117eab95f57297eb02bed0a964c32d887de3226
2023-08-11 00:36:47 +00:00
Renamed from tests/phpunit/unit/includes/http/HttpRequestFactoryTest.php (Browse further)