Commit graph

6 commits

Author SHA1 Message Date
James D. Forrester 291ea47dd3 tests: Namespace the PHP classes
This might make dependencies easier to find.

Change-Id: I158fd9f63f18a2b8da0368ac95d5fb5aa9bca3ff
2024-10-03 20:30:06 +00:00
thiemowmde 95fddc9228 Make all @covers tags in tests absolute
This is much less confusing for certain IDEs. Without the leading
backslash it looks like a relative patch, but isn't actually one.

Change-Id: I9c9f41869ea0ed063a67f8e65807833d1b3dba2b
2024-05-11 15:18:46 +00:00
Fomafix 5595193eb3 Inject services into TitleLocalCache
Change-Id: Ib1259484436591dd30b29651ccca474c0ce16d13
2024-03-17 21:22:00 +00:00
Umherirrender a0ca1d89c6 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statements done manually

Change-Id: Iad87245bf8082193be72f7e482f29e9f1bad11fc
2023-12-11 16:39:00 +01:00
Daimona Eaytoy ef50bfeda5 Make Title and Revision caches proper services
Singletons are bad, amongst other reasons, because they're never reset
in tests. They can therefore occasionally cause test failures if the
cached data stored in one of these singletons becomes stale.

As noted on the task, ideally these two classes shouldn't exist at all,
and core should be responsible for caching the information it deems
expensive to compute.

As a temporary (TM) workaround, make both classes actual services, so
that the setUp/tearDown logic in MediaWikiIntegrationTestCase can
properly reset them between tests.

Dependencies are intentionally not being injected, precisely because
these classes should just be deleted, not improved.

Bug: T344124
Change-Id: I58b8d9610f9447468235b94d25732528ab6acce6
2023-08-14 17:41:23 +02:00
Reedy 3609edf153 Namespace Cache
Change-Id: I8ead3ee485528f08f71c21cf401880bf369dbeac
2022-11-02 16:37:48 -06:00