aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/query/ApiQueryImageInfoTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/filerepoJames D. Forrester2025-03-191-1/+1
| | | | | Bug: T353458 Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
* Add namespace to includes/api classesJames D. Forrester2024-09-251-2/+2
| | | | | Bug: T353458 Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
* tests/api: Add missing documentation to class propertiesUmherirrender2024-09-101-0/+3
| | | | | | | | | | Add doc-typehints to class properties found by the PropertyDocumentation sniff to improve the documentation. Once the sniff is enabled it avoids that new code is missing type declarations. This is focused on documentation and does not change code. Change-Id: I48014b6464f3e7e2b7f083e67f517af0b1a9367e
* Replace db with getDb for TestsWandji692024-06-231-13/+13
| | | | | Bug: T316841 Change-Id: I29e535e8ee9b5641a4546d53b98cd5060d39681d
* TempAccounts: Rate limit acquisition of temp account namesKosta Harlan2024-04-231-1/+2
| | | | | | | | | | | | | | | | | | | Why: - We don't want to allow unlimited acquisition of temp account names. These should be rate limited in similar way to how we limit the creation of temp accounts What: - Provide a TempAccountNameAcquisitionThrottle, and use it in the acquireName() method - Set a default that is 10 times the limit of TempAccountNameCreationThrottle Depends-On: If660aad1d0f04f366414084aff3f88484a19d416 Bug: T343101 Change-Id: I99d5973498a89ac227847de5837c0a8e895c28fb
* tests: Migrate to IDatabase::newInsertQueryBuilderUmherirrender2024-04-141-20/+20
| | | | | | | | | Changed some inserts to use multi-row insert for small performance benefit where possible and not already used. InsertQueryBuilder does not return a value, deprecated since 1.33 Bug: T353219 Change-Id: I2380ebc8ec8db178dd790247aefbdd798b6d62ff
* Update wgAutoCreateTempUser config defaultsDreamy Jazz2024-04-031-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * The default value of wgAutoCreateTempUser has not changed since the decision to use a different prefix for temporary accounts (T332805). * The default needs to be updated to reduce the number of overrides in operations/mediawiki-config and also to make the development experience more consistent with what is happening on WMF production. What: * Update the wgAutoCreateTempUser default in the following ways: ** Set expireAfterDays as 365 ** Set notifyBeforeExpirationDays as 10 ** Set genPattern and reservedPattern to '~$1' ** Set matchPattern to null, which will mean that the genPattern is used as the value. * Update RealTempUserConfig::getPlaceholderName to add the year to the placeholder name so that if the match pattern includes the first digit of the year, then the placeholder name still is considered a valid temporary account username. * Replace modifications of the wgAutoCreateTempUser config in integration tests with a use of the TempUserTestTrait to make the code cleaner and make it easier to find tests that relies on the values in wgAutoCreateTempUser. * Update multiple tests to handle the new defaults for the config. Bug: T359335 Change-Id: Ifa5a0123cd915bdb7c87e473c51fb93321622f12
* tests: Namespace api testsReedy2024-02-181-0/+5
| | | | | Bug: T357823 Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-1/+1
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* tests: Fix name of class property in ApiQueryImageInfoTestUmherirrender2023-12-131-1/+1
| | | | | | | | Creation of dynamic property ApiQueryImageInfoTest::$tempUser is deprecated in php8.2 Follow-Up: I7986dea5ccd0dc942bf133040c4ac715487f29b9 Change-Id: Ifa2b1fc46a30edb12266d46b71d8916c53397cc0
* Add `temp` flags to api callsSTran2023-12-121-0/+55
| | | | | | | | | | | | Temporary accounts are now distinct from users or anonymous. Add a flag to reflect that to: - ApiQueryImageInfo - ApiQueryLogEvents - ApiQueryRecentChanges - ApiQueryRevisionsBase Bug: T351636 Change-Id: I7986dea5ccd0dc942bf133040c4ac715487f29b9
* Follow-up 71ff05267: Stop writing to tablesUsed in tests, now unnecessaryJames D. Forrester2023-11-211-6/+0
| | | | | Bug: T342301 Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
* Reorg: Move MWTimestamp to MediaWiki\UtilsAmir Sarabadani2023-08-191-0/+1
| | | | | Bug: T321882 Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
* phpunit: improve isolation by calling User::clearInstanceCachedaniel2022-12-041-5/+10
| | | | | | | User objects may hold references to service objects. They need to be reset when services are reset between and during tests. Change-Id: I7fe767977f1fe01d508fddf7a92ade3ec8ba2662
* tests/api: Add TestUser::getAuthority and use itUmherirrender2022-08-061-1/+1
| | | | Change-Id: Icfb66f9927c8e67582010a208538b0b5e0ba353f
* ApiQueryImageInfo: don't show empty comments as deletedPetr Pchelko2021-10-261-7/+72
| | | | | Bug: T293783 Change-Id: Icddd06c7171bc1d1dba14ec7d6703e082b87836a
* Add tests for ApiQueryImageInfoPetr Pchelko2021-06-011-0/+132
Change-Id: Ib31b659fc72362e942c29c8bd14a19a6ee9383d2