Commit graph

1 commit

Author SHA1 Message Date
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)