Commit graph

10 commits

Author SHA1 Message Date
Fomafix f68b218076 LanguagesHelper: Move $out from contructor to doesTitleHasLanguagesOrVariants
Services MUST NOT vary their behaviour on global state, especially not
WebRequest, RequestContext (T218555).

Change-Id: I4b73ef713166d8b254023c1eebbb45c963880a99
2024-03-25 22:34:37 +00:00
Fomafix 2f5b6f7c02 LanguagesHelperTest: Use @dataProvider to configure test cases
The two test cases can combined.

Change-Id: I7bff4993e87d8c7a95eb55d4e4596f9330105391
2024-03-05 18:37:35 +00:00
Fomafix 52583a336d Inject service LanguageConverterFactory in LanguagesHelper
Change-Id: I2fd1b4c3b25a94cca59d08216390652759859a62
2024-03-03 13:00:31 +00:00
Fomafix 751da83410 Remove wrong parameter $this->once()
This parameter was probably intended as parameter for getTitle(), but
it is in the wrong parentheses. And even on a repair of the parentheses
the tests still fail with:

> 1) MediaWiki\Minerva\LanguagesHelperTest::testReturnsWhenOutputDoesNotHaveLangLinks
> ILanguageConverter::hasVariants() was not expected to be called more than once.

Also remove the useless ->with( $languageMock ).

Change-Id: I35a0617de2fe7dd0b58060cc8273ef756051d04f
2024-03-03 12:57:25 +00:00
Fomafix 0e82eb5d40 LanguagesHelperTest: Remove unused parameter from method getTitle
The remaining
  ->expects( $this->any() )
is also removed, because it doesn't check anything.

Change-Id: I7651fa7f04fb314ff998cd9d68fd2a6099e4aadb
2024-03-02 21:50:12 +00:00
Umherirrender 1ad05f4a2e Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I1eec0823b7af97ea5031ff00b111e0c88b45a155
2024-01-06 16:31:38 +01:00
gerritbot fd2fe83a0c Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I236a14b07bd78141f82e86d7ea872d24b6cd88eb
2023-08-19 19:36:46 +02:00
EllenR b94ce6adbd Normalise PHP namespaces used in MinervaNeue
removed commented out code
changed namespace Tests\MediaWiki\Minerva to namespace
MediaWiki\Minerva

Bug: T303104
Change-Id: Ie151dcbfc65b49cb91fea81f8526287ca18d7a7d
2022-05-05 07:07:45 -06:00
Reedy b6685f9c4a Namespace SkinMinerva
Change-Id: I8f6bddac9f8cd060c551651e711ee987b8bbfbe3
2022-03-04 17:50:20 +00:00
Daimona Eaytoy dff83a4b24 Stop using deprecated Language methods
Change-Id: I46b6e388d96080ef0389601f01e2b2bb20cfd185
2021-02-27 15:59:17 +00:00
Renamed from tests/phpunit/unit/LanguagesHelperTest.php (Browse further)