wiki.techinc.nl/includes/title
Máté Szabó 7d44a728b6 title: Reset cached Title objects between tests
Why:

- Title has several in-memory caches for Titles constructed via
  newFromText() and for the canonical mainpage instance that
  isMainPage() compares against.
- These caches are not reset between tests, which can cause cryptic
  integration test failures. It's not safe to persist either of these
  caches across tests, as neither the internal state of Title objects nor
  the identity of the canonical mainpage is valid across tests.

What:

- Clear the cached main page instance in Title::clearCaches().
- Call Title::clearCaches() from MediaWikiIntegrationTestCase::resetNonServiceCaches().

Bug: T395214
Depends-On: Ic35b45015ff5a53f6e728b69b59cc57efe0b390b
Change-Id: Ie6cac7e1282f794277dfc8ff3673f12e9969818c
(cherry picked from commit 3f7905bc9ff9006831f8573b7fe948dc7243107e)
2025-05-27 12:35:10 +00:00
..
Hook
ForeignTitle.php Add "implements Stringable" to every class with "function __toString()" 2024-06-13 00:23:39 +00:00
ForeignTitleFactory.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
ImportTitleFactory.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
MalformedTitleException.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
MediaWikiTitleCodec.php Move Language and friends into Language namespace 2024-08-10 13:36:30 +02:00
NaiveForeignTitleFactory.php Move Language and friends into Language namespace 2024-08-10 13:36:30 +02:00
NaiveImportTitleFactory.php Move Language and friends into Language namespace 2024-08-10 13:36:30 +02:00
NamespaceAwareForeignTitleFactory.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
NamespaceImportTitleFactory.php Use real type hints for services etc. in includes/title/ 2024-07-31 08:56:17 +00:00
NamespaceInfo.php title: Use const for NamespaceInfo::$alwaysCapitalizedNamespaces 2024-09-01 12:06:28 +02:00
SubpageImportTitleFactory.php Use real type hints for services etc. in includes/title/ 2024-07-31 08:56:17 +00:00
Title.php title: Reset cached Title objects between tests 2025-05-27 12:35:10 +00:00
TitleArrayFromResult.php Standardise all our class alias deprecation comments for ease of grepping 2024-03-19 20:11:29 +00:00
TitleFactory.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
TitleFormatter.php Remove unchecked exception annotations 2024-09-17 22:20:58 +02:00
TitleParser.php Replace all instances of "per default" with "by default" 2024-04-29 10:47:54 +10:00
TitleValue.php Remove unchecked exception annotations 2024-09-17 22:20:58 +02:00