mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered. Bug: T142120 Bug: T142121 Change-Id: I7105170e56c8c3ec3837dd15be869e503bccecde
This commit is contained in:
parent
bf03dffebd
commit
6a8c53f6d1
|
@ -82,9 +82,6 @@
|
|||
],
|
||||
"APIGetParamDescription": [
|
||||
"ConfirmEditHooks::APIGetParamDescription"
|
||||
],
|
||||
"UnitTestsList": [
|
||||
"ConfirmEditHooks::onUnitTestsList"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
|
|
|
@ -138,32 +138,6 @@ class ConfirmEditHooks {
|
|||
self::getInstance()->onAuthChangeFormFields( $requests, $fieldInfo, $formDescriptor, $action );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to add PHPUnit test cases.
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
|
||||
*
|
||||
* @param array &$files
|
||||
* @return boolean
|
||||
*/
|
||||
public static function onUnitTestsList( array &$files ) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$directoryIterator = new RecursiveDirectoryIterator( dirname( __DIR__ ) . '/tests/' );
|
||||
|
||||
/**
|
||||
* @var SplFileInfo $fileInfo
|
||||
*/
|
||||
$ourFiles = [];
|
||||
foreach ( new RecursiveIteratorIterator( $directoryIterator ) as $fileInfo ) {
|
||||
if ( substr( $fileInfo->getFilename(), -8 ) === 'Test.php' ) {
|
||||
$ourFiles[] = $fileInfo->getPathname();
|
||||
}
|
||||
}
|
||||
|
||||
$files = array_merge( $files, $ourFiles );
|
||||
return true;
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up $wgWhitelistRead
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__ . '/../FancyCaptcha/HTMLFancyCaptchaField.php';
|
||||
require_once __DIR__ . '/../../FancyCaptcha/HTMLFancyCaptchaField.php';
|
||||
|
||||
class HTMLFancyCaptchaFieldTest extends PHPUnit_Framework_TestCase {
|
||||
public function testGetHTML() {
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__ . '/../ReCaptcha/HTMLReCaptchaField.php';
|
||||
require_once __DIR__ . '/../../ReCaptcha/HTMLReCaptchaField.php';
|
||||
|
||||
class HTMLReCaptchaFieldTest extends PHPUnit_Framework_TestCase {
|
||||
public function testSubmit() {
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__ . '/../ReCaptchaNoCaptcha/HTMLReCaptchaNoCaptchaField.php';
|
||||
require_once __DIR__ . '/../../ReCaptchaNoCaptcha/HTMLReCaptchaNoCaptchaField.php';
|
||||
|
||||
class HTMLReCaptchaNoCaptchaFieldTest extends PHPUnit_Framework_TestCase {
|
||||
public function testSubmit() {
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__ . '/../ReCaptcha/HTMLSubmittedValueField.php';
|
||||
require_once __DIR__ . '/../../ReCaptcha/HTMLSubmittedValueField.php';
|
||||
|
||||
class HTMLSubmittedValueFieldTest extends PHPUnit_Framework_TestCase {
|
||||
public function testSubmit() {
|
|
@ -14,7 +14,7 @@ class QuestyCaptchaTest extends MediaWikiTestCase {
|
|||
$this->setMwGlobals( 'wgCaptchaQuestions', $config );
|
||||
$this->mergeMwGlobalArrayValue(
|
||||
'wgAutoloadClasses',
|
||||
[ 'QuestyCaptcha' => __DIR__ . '/../QuestyCaptcha/QuestyCaptcha.class.php' ]
|
||||
[ 'QuestyCaptcha' => __DIR__ . '/../../QuestyCaptcha/QuestyCaptcha.class.php' ]
|
||||
);
|
||||
|
||||
$qc = new QuestyCaptcha();
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use MediaWiki\Auth\AuthenticationRequestTestCase;
|
||||
|
||||
require_once __DIR__ . '/../ReCaptcha/ReCaptchaAuthenticationRequest.php';
|
||||
require_once __DIR__ . '/../../ReCaptcha/ReCaptchaAuthenticationRequest.php';
|
||||
|
||||
class ReCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
||||
protected function getInstance( array $args = [] ) {
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use MediaWiki\Auth\AuthenticationRequestTestCase;
|
||||
|
||||
require_once __DIR__ . '/../ReCaptchaNoCaptcha/ReCaptchaNoCaptchaAuthenticationRequest.php';
|
||||
require_once __DIR__ . '/../../ReCaptchaNoCaptcha/ReCaptchaNoCaptchaAuthenticationRequest.php';
|
||||
|
||||
class ReCaptchaNoCaptchaAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
||||
protected function getInstance( array $args = [] ) {
|
Loading…
Reference in a new issue