ConfirmEditHandlerTest: Loosen message check test

Why:

- Ie13181b78b8e2903c6cc0f0f778689bcc8b8ce2e modifies the status message
  returned

What:

- Loosen the check for the status error message such that 'captcha-edit'
  and 'captcha-edit-fail' are both valid; we can revert this after
  Ie13181b78b8e2903c6cc0f0f778689bcc8b8ce2e is merged

Change-Id: I5a0698d84932a474800a68dba9b76b3433b19290
This commit is contained in:
Kosta Harlan 2024-07-09 10:32:33 +02:00
parent c316be857b
commit b58d91bcac

View file

@ -54,10 +54,10 @@ class ConfirmEditHandlerTest extends MediaWikiIntegrationTestCase {
$this->createMock( User::class ),
false
);
$this->assertStatusError(
'captcha-edit-fail',
$status,
'CaptchaConsequence specifies that a CAPTCHA should be shown'
);
$message = $status->getMessages( 'error' );
// FIXME: Change to `$this->assertStatusError( 'captcha-edit' );` after
// Ie13181b78b8e2903c6cc0f0f778689bcc8b8ce2e is merged.
$this->assertContains( $message[0]->getKey(), [ 'captcha-edit', 'captcha-edit-fail' ] );
}
}