Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5984118
QuestyCaptchaTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
QuestyCaptchaTest.php
View Options
<?php
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
*/
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
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 23:11 (2 w, 17 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
97/e2/bc36ef5869fb5925a88c4d7564b6
Default Alt Text
QuestyCaptchaTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment