Page MenuHomeWickedGov Phorge

QuestyCaptchaTest.php
No OneTemporary

Size
825 B
Referenced Files
None
Subscribers
None

QuestyCaptchaTest.php

<?php
use MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha;
/**
* @covers \MediaWiki\Extension\ConfirmEdit\QuestyCaptcha\QuestyCaptcha
*/
class QuestyCaptchaTest extends MediaWikiIntegrationTestCase {
/**
* @dataProvider provideGetCaptcha
*/
public function testGetCaptcha( $config, $expected ) {
$this->overrideConfigValue( 'CaptchaQuestions', $config );
$qc = new QuestyCaptcha();
$this->assertEquals( $expected, $qc->getCaptcha() );
}
public static function provideGetCaptcha() {
return [
[
[
[
'question' => 'FooBar',
'answer' => 'Answer!',
],
],
[
'question' => 'FooBar',
'answer' => 'Answer!',
],
],
[
[
'FooBar' => 'Answer!',
],
[
'question' => 'FooBar',
'answer' => 'Answer!',
],
]
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 15 2026, 07:09 (12 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d7/8a/7d1e7e726062e408ed093f06d7fb
Default Alt Text
QuestyCaptchaTest.php (825 B)

Event Timeline