Commit graph

18 commits

Author SHA1 Message Date
Ebrahim Byagowi
4c270a72ac Add namespace to WikitextContent
It adds MediaWiki\Content namespace to WikitextContent
and two classes related.

Change-Id: Ib74e4c5b3edac6aa0e35d3b2093ce1d0b794cb6d
2024-08-06 17:42:51 +03:30
Umherirrender
07db7102cc Replace deprecated LogFormatter::newFromRow/newFromEntry
Change-Id: I453ce3148a46fcb9cc5c685cee92274e0cb4f98a
2024-07-29 22:26:41 +02:00
jenkins-bot
82d91ed739 Merge "Use MainConfigNames constants in tests where possible" 2024-07-11 12:46:04 +00:00
thiemowmde
4bd95cd96b Use MainConfigNames constants in tests where possible
I believe this makes the code less brittle, and also makes it a bit
more obvious what these strings are meant to represent.

Change-Id: Ia39b5c80af4b495931d0a68fd091b783645dd709
2024-07-10 10:11:22 +00:00
Daimona Eaytoy
1a12ea930b includes: Replace usages of deprecated WikiPage::doDeleteArticleReal
Change-Id: Icdf1b25f2f5202e4f1f83bbea5b6436ccbb7f3b5
2024-07-10 00:11:18 +02:00
Wandji69
c257e2276c Replace db with getDb for Tests
Bug: T316841
Change-Id: I29e535e8ee9b5641a4546d53b98cd5060d39681d
2024-06-23 23:47:56 +01:00
jenkins-bot
990fd9441c Merge "schema: Drop old pagelinks columns" 2024-06-18 20:28:09 +00:00
Amir Sarabadani
bb6c6e4174 schema: Drop old pagelinks columns
It has been dropped in production already.

Bug: T299947
Change-Id: I8ec1e7d9224c81d6494c39c78df9e4bdac38d377
2024-06-18 21:13:38 +02:00
Bartosz Dziewoński
279fd16bab tests: Avoid deprecated Status / StatusValue methods
Use more specific and less fragile assertions whenever possible;
most tests don't need to examine the internals of the status so
closely. Use StatusValue::getMessages() when necessary.

Change-Id: Ie4b3ebc03abb0e352e82394ced6ab9e733c83fb4
2024-06-15 10:14:37 +02:00
jenkins-bot
b818392c05 Merge "MovePageTest: Don't use wikitext-specific getExistingTestPage to inject a JS page" 2024-06-05 13:45:56 +00:00
Ebrahim Byagowi
49fe440c63 Add namespace and deprecation alias to WatchedItemStore
This patch introduces a namespace declaration for the
MediaWiki\Watchlist to WatchedItemStore and establishes a class
alias marked as deprecated since version 1.43.

Bug: T353458
Change-Id: I820a3512440ba5a1de13e8470ccf5845918f3198
2024-05-20 19:14:17 +03:30
James D. Forrester
f33a0cdda2 MovePageTest: Don't use wikitext-specific getExistingTestPage to inject a JS page
Change-Id: I68174b15676b0f7f4bb5b74e0de4c7f30a5c1e04
2024-05-17 09:57:29 -04:00
Brian Wolff
a58e7ba643 Make sure MovePage::isValidFileMove matches UploadBase::getTitle
MovePage::isValidFileMove was not checking that filenames are at
most 240 bytes. This was causing metadata for old versions of
file to be cut off.

Also add checks for non-ascii filenames on systems not supporting
unicode. To be extra careful also add an explicit check for files
that are only an extension although its likely such moves would
have failed for other reasons.

Bug: T359294
Change-Id: I9e75a3e4007b76d66f1305e9107dadbbbfb4d5cb
2024-03-06 02:47:42 -08:00
Amir Sarabadani
c04f1d64d6 Remove IDBAccessObject from being implemented in many classes
This is inconsistent with the access pattern of other constants in
MediaWiki. it's also confusing (e.g. it's unclear to a newcomer why
UserFactory is implementing IDBAccessObject) and it's prone to clashes
(e.g. BagOStuff class has a clashing constant).

It has been already announced: https://w.wiki/9DAX

Bug: T354194
Change-Id: Ic2357634b8385d65b55db2b557191419b06c40e0
2024-02-19 10:50:02 +01: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
4ed5ca48b1 Follow-up 71ff05267: Stop writing to tablesUsed in tests, now unnecessary
Bug: T342301
Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
2023-11-21 09:02:48 -05:00
James D. Forrester
1d0b7ae1e2 Namespace User under \MediaWiki\User
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
2023-09-19 19:18:16 +00:00
Umherirrender
790ae736c1 tests: Move test cases from /includes/ into sub folder
Follow move of the tested class
Most moves are part of T321882

Change-Id: I74ab45d6a5331dcb2ff0b65dc2cc7c6315146646
2023-09-13 00:09:05 +02:00
Renamed from tests/phpunit/includes/MovePageTest.php (Browse further)