diff options
author | Kosta Harlan <kharlan@wikimedia.org> | 2024-06-26 10:58:20 +0200 |
---|---|---|
committer | Kosta Harlan <kharlan@wikimedia.org> | 2024-06-26 13:13:54 +0200 |
commit | 638117c424eb4172a706a7b961880faae0c8fcdf (patch) | |
tree | 493ac0ff2556d4bcef478e83446acd554a1ada01 /tests/phpunit/includes/api/query | |
parent | c7c1404d2739c14a5b785668243232fa50e62724 (diff) | |
download | mediawikicore-638117c424eb4172a706a7b961880faae0c8fcdf.tar.gz mediawikicore-638117c424eb4172a706a7b961880faae0c8fcdf.zip |
ApiQueryWatchlistIntegrationTest: Disable temp account in anon edit
Why:
- The test class does anonymous edits, but did not first disable temp
user creation
What:
- Disable temp user creation before attempting an anonymous edit
- Enable temp account feature when calling doTempPageEdit
- Remove call to enableAutoCreateTempUser in testShowAnonParamsTemp, as
it's no longer needed
Bug: T365669
Change-Id: I2ce83d5703ecc75fe680d7ddb44aa406c26c4df5
Diffstat (limited to 'tests/phpunit/includes/api/query')
-rw-r--r-- | tests/phpunit/includes/api/query/ApiQueryWatchlistIntegrationTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/api/query/ApiQueryWatchlistIntegrationTest.php b/tests/phpunit/includes/api/query/ApiQueryWatchlistIntegrationTest.php index 2a0998ba7193..893694c78141 100644 --- a/tests/phpunit/includes/api/query/ApiQueryWatchlistIntegrationTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryWatchlistIntegrationTest.php @@ -77,6 +77,7 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { } private function doAnonPageEdit( LinkTarget $target, $content, $summary ) { + $this->disableAutoCreateTempUser(); $this->editPage( $target, $content, @@ -86,8 +87,8 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { ); } - // Requires call to $this->enableAutoCreateTempUser() first. private function doTempPageEdit( LinkTarget $target, $content, $summary ) { + $this->enableAutoCreateTempUser(); $this->editPage( $target, $content, @@ -911,7 +912,6 @@ class ApiQueryWatchlistIntegrationTest extends ApiTestCase { } public function testShowAnonParamsTemp() { - $this->enableAutoCreateTempUser(); $user = $this->getLoggedInTestUser(); $target = new TitleValue( NS_MAIN, 'ApiQueryWatchlistIntegrationTestPage' ); $this->doTempPageEdit( |