aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/language/LanguageFallbackIntegrationTest.php
Commit message (Collapse)AuthorAgeFilesLines
* language: Widen `@covers` tags in phpunit testsTimo Tijhof2024-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a few missing `@group Language` tags as well. Remove stray `@group Cache` from two classes since "Cache" is not a MediaWiki core component (per T248519 and related tasks, we did long ago in Bugzilla have a "MediaWiki-Cache" category, but that's since been re-orged into BagOStuff, HTTP-Cache, and Parser/ParserCache, and Internationalization/LocalisationCache, per the description at <https://phabricator.wikimedia.org/project/profile/1329/>.) Ref https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen > Given all called methods are de-facto and liberally claimed, and > that we keep the coverage limited to the subject class, it maintains > the spirit and intent by listing the class explicitly instead. > > PHPUnit offers a more precise tool when you need it (i.e. when testing > legacy monster/god classes), but for well-written code, the > class-wide tag is exactly what you want. > > We lose useful coverage and waste valuable time on keeping tags > accurate through refactors (or worse, forget to do so). > Tracking tiny per-method details wastes time in realizing (and > fixing) when people inevitably don't keep them in sync, and time > lost in finding uncovered code to write tests to realize it was > already covered but "not yet claimed". Bug: T364652 Change-Id: I9cfc4c210b90bfed6fd988a2525f80f5f5ee4870
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-1/+1
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* Migrate usage of `setMwGlobals()` to `overrideConfigValue(s)`Derick Alangi2022-08-011-1/+2
| | | | Change-Id: I49d97864d8f9d8cadf01b0c0dc653fbac4ca9e94
* phpunit: use ->getServiceContainer() in integration testsAlexander Vorwerk2022-01-271-2/+1
| | | | Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
* New LanguageFallback serviceAryeh Gregor2019-10-081-0/+31
This replaces the static Language methods getFallbackFor(), getFallbacksFor(), and getFallbacksIncludingSiteLanguage(). There is 100% unit and integration test coverage for the new class. One deliberate functional change: I changed one place where we threw MWException to InvalidArgumentException. Bug: T201405 Depends-On: Ie7a89f6ed7d52a0bc01672019ff92e7ee105a1f3 Change-Id: I49222eb55f1feec5b1dcd40f364cffe0c8801855