wiki.techinc.nl/tests/phpunit/unit/includes/parser
Daimona Eaytoy 31fcbb83c1 Replace usages of wfParseUrl
wfParseUrl falls back to the global service locator as of I706ef8a5.
This will soon be disallowed in unit tests (see I5117eab9), and all the
classes updated in this patch are covered by a unit test that would then
fail.

SiteConfig already has a UrlUtils object available, so just use that.

In the other classes, there is no need to inject a UrlUtils service and
we can instead adopt parse_url, because these didn't depend on our
site-configurable or custom parsing logic. For precedent see also
change I6492f5142861513e4a7, I1e76d2f5aef, and lots of other examples
in Codesearch for parse_url().

The warnings about parse_url() in UrlUtils.php have been obsolete
since about PHP 5.4, when it started to support protocol-relative
URLs, non-slash protocols like "mailto", and deal with spaces/newlines
correctly (https://3v4l.org/YWUkl).

This patch was partly copied from PS 20 of I5117eab9.

Co-Authored-by: Timo Tijhof <krinkle@fastmail.com>
Change-Id: I98ea4670e842d11598664f058d8c90a900477be4
2023-08-11 00:00:25 +00:00
..
Parsoid Replace usages of wfParseUrl 2023-08-11 00:00:25 +00:00
LinkHolderArrayTest.php Merge "parser: Make all LinkHolderArray properties private" 2023-04-08 22:28:31 +00:00
ParserCacheFactoryTest.php Reorg: Move Title-related classes to title/ 2022-11-26 09:30:32 +00:00
ParserFactoryTest.php Fix incomplete/broken ParserFactoryTest & ParserTest 2023-07-28 14:22:46 +00:00
ParserObserverTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
SanitizerUnitTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00