mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-11 17:00:49 +00:00
Drop various class aliases
Move manual wgAutoloadClasses entries into TestAutoloadClasses Change-Id: I4c85a2042ae591732b48bbf872277909a90675b4
This commit is contained in:
parent
c60beba52d
commit
3798d424e2
|
@ -17,10 +17,6 @@
|
|||
"i18n/api"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"FancyCaptcha": "includes/FancyCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\FancyCaptcha": "includes/FancyCaptcha.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\": "includes/"
|
||||
},
|
||||
|
|
|
@ -514,5 +514,3 @@ class FancyCaptcha extends SimpleCaptcha {
|
|||
] + $formDescriptor['captchaWord'];
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( FancyCaptcha::class, 'FancyCaptcha' );
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
"i18n"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"MathCaptcha": "includes/MathCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\MathCaptcha\\MathCaptcha": "includes/MathCaptcha.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\MathCaptcha\\": "includes/"
|
||||
},
|
||||
|
|
|
@ -125,5 +125,3 @@ class MathCaptcha extends SimpleCaptcha {
|
|||
$formDescriptor['captchaWord']['label-message'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( MathCaptcha::class, 'MathCaptcha' );
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
"i18n"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"QuestyCaptcha": "includes/QuestyCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\QuestyCaptcha": "includes/QuestyCaptcha.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\": "includes/"
|
||||
},
|
||||
|
|
|
@ -146,5 +146,3 @@ class QuestyCaptcha extends SimpleCaptcha {
|
|||
$formDescriptor['captchaWord']['label-message'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( QuestyCaptcha::class, 'QuestyCaptcha' );
|
||||
|
|
|
@ -55,16 +55,16 @@
|
|||
"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/",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\SimpleCaptcha\\": "SimpleCaptcha/"
|
||||
},
|
||||
"TestAutoloadClasses": {
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\HTMLFancyCaptchaField": "FancyCaptcha/includes/HTMLFancyCaptchaField.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\QuestyCaptcha": "QuestyCaptcha/includes/QuestyCaptcha.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\HTMLReCaptchaNoCaptchaField": "ReCaptchaNoCaptcha/includes/HTMLReCaptchaNoCaptchaField.php",
|
||||
"MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptchaAuthenticationRequest": "ReCaptchaNoCaptcha/includes/ReCaptchaNoCaptchaAuthenticationRequest.php"
|
||||
},
|
||||
"ResourceModules": {
|
||||
"ext.confirmEdit.editPreview.ipwhitelist.styles": {
|
||||
"styles": "ext.confirmEdit.editPreview.ipwhitelist.styles.css"
|
||||
|
|
|
@ -337,5 +337,3 @@ class Hooks implements
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class_alias( Hooks::class, 'ConfirmEditHooks' );
|
||||
|
|
|
@ -54,5 +54,3 @@ class CaptchaCacheStore extends CaptchaStore {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias( CaptchaCacheStore::class, 'CaptchaCacheStore' );
|
||||
|
|
|
@ -10,19 +10,6 @@ use MediaWiki\Title\Title;
|
|||
* @group Database
|
||||
*/
|
||||
class HTMLFancyCaptchaFieldTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\FancyCaptcha\\HTMLFancyCaptchaField'
|
||||
=> __DIR__ . '/../../FancyCaptcha/includes/HTMLFancyCaptchaField.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetHTML() {
|
||||
$html = $this->getForm( [ 'imageUrl' => 'https://example.com/' ] )->getHTML( false );
|
||||
$this->assertMatchesRegularExpression( '/"fancycaptcha-image"/', $html );
|
||||
|
|
|
@ -8,19 +8,6 @@ use MediaWiki\Title\Title;
|
|||
* @covers \MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\HTMLReCaptchaNoCaptchaField
|
||||
*/
|
||||
class HTMLReCaptchaNoCaptchaFieldTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\HTMLReCaptchaNoCaptchaField'
|
||||
=> __DIR__ . '/../../ReCaptchaNoCaptcha/includes/HTMLReCaptchaNoCaptchaField.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function testSubmit() {
|
||||
$request = new FauxRequest( [
|
||||
'foo' => 'abc',
|
||||
|
|
|
@ -6,17 +6,6 @@ use MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha;
|
|||
* @covers \MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha
|
||||
*/
|
||||
class QuestyCaptchaTest extends MediaWikiIntegrationTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[ 'MediaWiki\\Extension\\ConfirmEdit\\QuestyCaptcha\\QuestyCaptcha'
|
||||
=> __DIR__ . '/../../QuestyCaptcha/includes/QuestyCaptcha.php' ]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha::getCaptcha
|
||||
* @dataProvider provideGetCaptcha
|
||||
|
|
|
@ -8,18 +8,6 @@ use MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha\ReCaptchaNoCaptchaAuthent
|
|||
*/
|
||||
class ReCaptchaNoCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[
|
||||
'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptchaAuthenticationRequest'
|
||||
=> __DIR__ . '/../../ReCaptchaNoCaptcha/includes/ReCaptchaNoCaptchaAuthenticationRequest.php'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
protected function getInstance( array $args = [] ) {
|
||||
return new ReCaptchaNoCaptchaAuthenticationRequest();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue