aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
diff options
context:
space:
mode:
authorDreamy Jazz <wpgbrown@wikimedia.org>2024-03-26 15:04:36 +0000
committerDreamy Jazz <dreamyjazzwikipedia@gmail.com>2024-04-03 16:25:47 +0000
commit102424bfb31825a46f8a6ba5bd21ff8f76938046 (patch)
tree56af6b516ef166ece50ab4120dc045e1fb0a28b2 /tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
parentf421c2786190dc83146daf62bafac3ab63fa62c3 (diff)
downloadmediawikicore-102424bfb31825a46f8a6ba5bd21ff8f76938046.tar.gz
mediawikicore-102424bfb31825a46f8a6ba5bd21ff8f76938046.zip
Update wgAutoCreateTempUser config defaults
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
Diffstat (limited to 'tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php')
-rw-r--r--tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php b/tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
index 0d03be7b123a..ce2f4be23717 100644
--- a/tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
+++ b/tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
@@ -60,7 +60,7 @@ class ApiQueryRevisionsTest extends ApiTestCase {
*/
public function testRevisionMadeByTempUser() {
$this->enableAutoCreateTempUser();
- $tempUser = new UserIdentityValue( 1236764321, '*Unregistered 1' );
+ $tempUser = new UserIdentityValue( 1236764321, '~1' );
$title = $this->getNonexistingTestPage( 'TestPage1' )->getTitle();
$this->editPage(