mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-13 18:07:00 +00:00
Remove class_alias calls and cleanup Autoloads
Existed since 1.39 in I3fa9747e0ea970c5de39e2da8603e1bba9388a69 Change-Id: I17a648aaf7644d00cd82966a88dab8f33d2e317f
This commit is contained in:
parent
9f2e976f10
commit
a801949300
|
@ -17,10 +17,6 @@
|
|||
"i18n/api"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"FancyCaptcha": "../includes/FancyCaptcha/FancyCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\FancyCaptcha": "../includes/FancyCaptcha/FancyCaptcha.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\": "../includes/FancyCaptcha/"
|
||||
},
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
"i18n"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"QuestyCaptcha": "../includes/QuestyCaptcha/QuestyCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\QuestyCaptcha": "../includes/QuestyCaptcha/QuestyCaptcha.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\": "../includes/QuestyCaptcha/"
|
||||
},
|
||||
|
|
|
@ -55,12 +55,6 @@
|
|||
"ExtensionMessagesFiles": {
|
||||
"ConfirmEditAlias": "ConfirmEdit.alias.php"
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"CaptchaCacheStore": "includes/Store/CaptchaCacheStore.php",
|
||||
"ConfirmEditHooks": "includes/Hooks.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\Hooks": "includes/Hooks.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\Store\\CaptchaCacheStore": "includes/Store/CaptchaCacheStore.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\": "includes/"
|
||||
},
|
||||
|
|
|
@ -516,5 +516,3 @@ class FancyCaptcha extends SimpleCaptcha {
|
|||
] + $formDescriptor['captchaWord'];
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( FancyCaptcha::class, 'FancyCaptcha' );
|
||||
|
|
|
@ -349,5 +349,3 @@ class Hooks implements
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class_alias( Hooks::class, 'ConfirmEditHooks' );
|
||||
|
|
|
@ -150,5 +150,3 @@ class QuestyCaptcha extends SimpleCaptcha {
|
|||
$formDescriptor['captchaWord']['label-message'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( QuestyCaptcha::class, 'QuestyCaptcha' );
|
||||
|
|
|
@ -48,5 +48,3 @@ class CaptchaCacheStore extends CaptchaStore {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( CaptchaCacheStore::class, 'CaptchaCacheStore' );
|
||||
|
|
|
@ -14,18 +14,6 @@ use MediaWiki\Title\Title;
|
|||
*/
|
||||
class HTMLFancyCaptchaFieldTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\HTMLFancyCaptchaField'
|
||||
=> __DIR__ . '/../../includes/FancyCaptcha/HTMLFancyCaptchaField.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetHTML() {
|
||||
$html = $this->getForm( [ 'imageUrl' => 'https://example.com/' ] )->getHTML( false );
|
||||
$this->assertMatchesRegularExpression( '/"fancycaptcha-image"/', $html );
|
||||
|
|
|
@ -12,18 +12,6 @@ use MediaWiki\Title\Title;
|
|||
*/
|
||||
class HTMLReCaptchaNoCaptchaFieldTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\HTMLReCaptchaNoCaptchaField'
|
||||
=> __DIR__ . '/../../includes/ReCaptchaNoCaptcha/HTMLReCaptchaNoCaptchaField.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function testSubmit() {
|
||||
$request = new FauxRequest( [
|
||||
'foo' => 'abc',
|
||||
|
|
|
@ -7,16 +7,6 @@ use MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha;
|
|||
*/
|
||||
class QuestyCaptchaTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[ 'MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\QuestyCaptcha'
|
||||
=> __DIR__ . '/../../includes/QuestyCaptcha/QuestyCaptcha.php' ]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha::getCaptcha
|
||||
* @dataProvider provideGetCaptcha
|
||||
|
|
|
@ -8,18 +8,6 @@ use MediaWiki\Tests\Auth\AuthenticationRequestTestCase;
|
|||
*/
|
||||
class ReCaptchaNoCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptchaAuthenticationRequest'
|
||||
=> __DIR__ . '/../..//includes/ReCaptchaNoCaptcha/ReCaptchaNoCaptchaAuthenticationRequest.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
protected function getInstance( array $args = [] ) {
|
||||
return new ReCaptchaNoCaptchaAuthenticationRequest();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue