Merge "ConfirmEditHandlerTest: Remove method_exists checks"

This commit is contained in:
jenkins-bot 2024-07-09 11:32:25 +00:00 committed by Gerrit Code Review
commit c316be857b

View file

@ -42,10 +42,7 @@ class ConfirmEditHandlerTest extends MediaWikiIntegrationTestCase {
$this->assertStatusGood( $status, 'The default is to not show a CAPTCHA' );
$simpleCaptcha = Hooks::getInstance();
// FIXME: Remove this method_exists check after Idc47bdae8007da938f31e1c0f33e9be4813f41d7 is merged
if ( method_exists( $simpleCaptcha, 'setEditFilterMergedContentHandlerInvoked' ) ) {
$simpleCaptcha->setEditFilterMergedContentHandlerInvoked();
}
$simpleCaptcha->setEditFilterMergedContentHandlerInvoked();
$simpleCaptcha->setAction( 'edit' );
$captchaConsequence = new CaptchaConsequence( $this->createMock( Parameters::class ) );
$captchaConsequence->execute();
@ -57,13 +54,10 @@ class ConfirmEditHandlerTest extends MediaWikiIntegrationTestCase {
$this->createMock( User::class ),
false
);
// FIXME: Remove this method_exists check after Idc47bdae8007da938f31e1c0f33e9be4813f41d7 is merged
if ( method_exists( $simpleCaptcha, 'shouldForceShowCaptcha' ) ) {
$this->assertStatusError(
'captcha-edit-fail',
$status,
'CaptchaConsequence specifies that a CAPTCHA should be shown'
);
}
$this->assertStatusError(
'captcha-edit-fail',
$status,
'CaptchaConsequence specifies that a CAPTCHA should be shown'
);
}
}