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
Daimona Eaytoy
660c1539e3
Do not use UTPage directly in tests
...
UTPage is a badly named page that should not be used directly. In fact,
soon it will no longer be guaranteed to exist (T342428). Tests should
create the fixtures they need, using titles/summaries that are actually
meaningful and that make it easy to identify what test is responsible
for creating a given page.
In ApiSetNotificationTimestampIntegrationTest, make separate assertions
because the order of the two pages in the result set is not stable
(ApiPageSet::initFromTitles has no ORDER BY).
Change-Id: Iecfb75e16deaa2f682afd916f58d8c548ee1cbac
2023-08-12 23:51:53 +02:00
Umherirrender
d3fb83de20
tests: api: Use NS_ constants instead of hard coded values
...
Avoid some "magic" numbers
Change-Id: I52ec97434751cfe4136d504a3f8107c6bc63e7ab
2023-07-29 11:02:26 +02:00
libraryupgrader
7375f3a5fe
build: Updating mediawiki/mediawiki-codesniffer to 41.0.0
...
The following sniffs are failing and were disabled:
* MediaWiki.Usage.ForbiddenFunctions.eval
Change-Id: I6fd0a9296c88a77c3abec6e5e8d568bb469c2d6e
2023-03-11 19:04:09 +00:00
Umherirrender
278391c03f
API: Fix result of action=setnotificationtimestamp for non-watched title
...
WatchedItemStore::getNotificationTimestampsBatch returns false for pages
not on the watchlist, which bypass the array_key_exists check
Change-Id: I0bdc4100ad340dc28d192a6a2f821b9ca0e34859
2022-04-25 17:35:22 +00:00
Alexander Vorwerk
decbaf4f38
phpunit: use ->getServiceContainer() in integration tests
...
Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
2022-01-27 22:04:16 +01:00
Cindy Cicalese
b242d49a62
Use WatchlistManager in API classes
...
Change-Id: I7b2016162e86b455c0102742751981c44d7e829c
2021-04-21 04:41:06 +00:00
Umherirrender
a4340532e9
Set tablesUsed to watchlist for some api tests
...
This avoids leaking watchlist data between the test runs
Change-Id: I5b04849af0b001c5c114fde74c39e46423fe2280
2021-02-06 19:53:58 +01:00
DannyS712
e715dbd4a4
Misc cleanup to api integration tests
...
Each file's changes are separate and can be reviewed independently
Change-Id: Ic0c24fa3f1616bb3428416a29d245a7e0bbb21b6
2021-01-21 06:32:58 +00:00
Max Semenik
48a323f702
tests: Add explicit return type void to setUp() and tearDown()
...
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
2019-10-30 14:31:22 -07:00
Thiemo Kreuz
8a4e15db7f
Add missing newline between <?php and namespace/use section
...
The rest of the codebase is using this code formatting standard.
Change-Id: I4d2ba61757a7e28d40096d9dc5915005c340d4f2
2019-06-03 13:36:48 +00:00
Aryeh Gregor
ed40e8ec53
Get rid of ApiTestCase::doLogin
...
The function is entirely unnecessary.
Change-Id: I805520e5355119e872e602d0bfc93be26f227128
2018-04-11 20:17:52 +03:00
addshore
5660bc91af
Add ApiSetNotificationTimestampIntegrationTest
...
Change-Id: If0bc1f56533102f54c0031eea548c20d8abe1818
2016-05-18 12:08:47 +01:00