ConfirmEditHandlerTest: Remove method_exists checks

Why:

- These checks are no longer needed, now that Idc47bda has been merged

What:

- Remove the `method_exists()` checks

Change-Id: I6e428df6b6e036146ae4cc57374cde8810d3f5f7
This commit is contained in:
Kosta Harlan 2024-07-09 10:27:03 +02:00
parent 18ed47a687
commit 62629ec3e9
No known key found for this signature in database
GPG key ID: BC3D8915606A5ED9

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'
);
}
}