Commit graph

14 commits

Author SHA1 Message Date
Reedy
8771b338e4 tests: Namespace more parser classes
Change-Id: I35d6e3181ed885b8731ff1c4b5703459fb4223e4
2024-02-17 00:38:31 +00:00
Reedy
85396a9c99 tests: Fix @covers and @coversDefaultClass to have leading \
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
2024-02-16 22:43:56 +00:00
James D. Forrester
1d0b7ae1e2 Namespace User under \MediaWiki\User
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
2023-09-19 19:18:16 +00:00
Daimona Eaytoy
5035ecd2f7 CoreParserFunctionsTest: Avoid username pattern reserved for temp users
The leading "*" is currently used as the username pattern for temp
users, meaning this test will fail if

  $wgAutoCreateTempUser['enabled'] = true;

Put the star at the end instead, and use a variable for the username
instead of repeating it multiple times.

Change-Id: Ie0414de5f9d9054dfec540f14bd0dc9ec7b4cb72
2023-07-16 19:55:50 +02:00
Tim Starling
5e30a927bc tests: Make some PHPUnit data providers static
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.

Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.

Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
2023-03-24 02:53:57 +00:00
Amir Sarabadani
523ab7cff8 Reorg: Move RawMessage to under language/
To follow Message. This is approved as part of RFC T166010.

Also namespace it but doing it properly with PSR-4 would require
namespacing every class under language/ and that will take some time.

Bug: T321882
Change-Id: I195cf4c67bd51410556c2dd1e33cc9c1033d5d18
2022-12-16 11:30:19 +01:00
Alexander Vorwerk
decbaf4f38 phpunit: use ->getServiceContainer() in integration tests
Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
2022-01-27 22:04:16 +01:00
Alexander Vorwerk
04dfdc3653 Hard deprecate User::setOption()
deprecated since 1.35

Bug: T277818
Change-Id: Ic251d624e5d6fa857aa92f9c5dd3df44714ac610
2021-09-26 17:18:54 +02:00
DannyS712
24d26873e3 CoreParserFunctionsTest: fix duplication
testSubjectpagename was probably copied from
testTalkpagename and so uses the wrong data provider
and tests the wrong code

Change-Id: Ied4023a8fdd57a1c2b538eca6034c37e94967bc7
2021-03-22 01:48:03 +00:00
Umherirrender
62002cdcf1 build: Update mediawiki/mediawiki-codesniffer to 35.0.0
Change-Id: Idb413be4b8cba8611afdc022af59810ce1a4531e
2021-01-31 13:34:38 +00:00
Reedy
813bd8114a Use $msg2 in CoreParserFunctionsTest::testGender
Bug: T263091
Change-Id: Ifd5bcab9e3aba16ddf4b86d7e28971507bee696a
2020-09-17 03:26:43 +01:00
Thiemo Kreuz
50dca8ed1e Replace some oldskool @see with @inheritDoc
This patch also adds some missing newlines at the beginning of files.

Change-Id: Ifcdf75396c96f17b7bfb103f54bfdf4ba4dfbccc
2019-11-08 18:00:27 +00:00
daniel
dbce648a15 Ensure canHaveTalkPage returns false when getTalkPage would fail.
This causes Title::getTalkPage and NamespaceInfo::getTitle() to throw
an MWException when called on a LinkTarget that is an interwiki link
or a relative section link. These methods were already throwing
MWException when called on a link to a Special page.

Bug: T224814
Change-Id: I525c186a5b8b8fc22bca195da48afead3bfbd402
2019-07-03 10:40:10 +02:00
Brian Wolff
5fd1e1abe0 Make Gender normalize usernames
This ensures that if GENDER is fed wfEscapeWikitext()'d version
of a username, it will normalize it.

See discussion on T182800.

Note, we do not need to worry about the case of a user named
"Project:*foo" as such namespace prefixes are illegal in
usernames.

Change-Id: Ic5a8fc76c28dca43ce8e334ef1874c2673433f00
2018-01-22 23:12:01 +00:00