aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiUndeleteTest.php
Commit message (Collapse)AuthorAgeFilesLines
* PHPUnit: Use FQCN with leading backslash in @covers annotationFomafix2024-11-191-2/+2
| | | | | | | | | | | https://docs.phpunit.de/en/11.4/annotations.html#covers recommends: > Please note that this annotation requires a fully-qualified class > name (FQCN). To make this more obvious to the reader, it is > recommended to use a leading backslash (even if this not required for > the annotation to work correctly). Change-Id: I7eb4b997346387e5799fa27a61ab317573124fd0
* Add namespace to IDBAccessObject and DBAccessObjectUtilsJames D. Forrester2024-09-271-1/+1
| | | | | Bug: T353458 Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
* Add namespace to includes/api classesJames D. Forrester2024-09-251-2/+2
| | | | | Bug: T353458 Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
* tests: Namespace api testsReedy2024-02-181-0/+3
| | | | | Bug: T357823 Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-2/+2
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* Remove indirect calls to IDBAccessObject::READ_* constantsAtieno2024-01-291-2/+2
| | | | | | | | | We are getting rid of the schema of implementing this interface and calling self::READ_* constants, it's confusing, inconsistent, prone to clashes and isn't really useful for non-ORM systems (which we are not) Bug: T354194 Change-Id: I4c722807b27db4e59f5ba3acc3ddb57fca9140b1
* Follow-up 71ff05267: Stop writing to tablesUsed in tests, now unnecessaryJames D. Forrester2023-11-211-4/+0
| | | | | Bug: T342301 Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
* tests: api: Replace Title::newFromText with Title::makeTitleUmherirrender2023-07-301-7/+6
| | | | | | | | | | | | | | Parsing titles is expensive, it happens in the test function itself via Title::newFromText and also the called editPage() needs to parse the title, better to pass the title object there. Title::newFromText has a cache, that share the title object between the api code and the test code. Use independent title objects for testing. This requires some Title::READ_LATEST to ensure the changed database after the api call is used. Change-Id: I00c14e270a5f4078f80d78696ca2e39acf138e95
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-0/+1
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* tests: Use `overrideConfig(Value|Values)` where neededDerick Alangi2022-07-121-3/+3
| | | | | | | This patch covers: tests/phpunit/includes/actions/ and tests/phpunit/includes/api/. Change-Id: I60d8fb7b8a63b423606db935fa0d24cf859b2512
* Use WatchlistManager in API classesCindy Cicalese2021-04-211-2/+3
| | | | Change-Id: I7b2016162e86b455c0102742751981c44d7e829c
* Add watchlist expiry support to applicable APIsMusikAnimal2020-07-131-0/+58
This introduces an ApiWatchlistTrait that refactors out common code across APIs that allow you to watch pages. Some methods have been migrated from ApiBase and changed completely, but codesearch suggests they aren't being used outside the API modules in this patch. Bug: T248512 Bug: T248514 Change-Id: Ia18627b9824dca81f44f0571e8420d89b7626cf6