Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7451985
MatchSetValidatorTest.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
MatchSetValidatorTest.php
View Options
<?php
declare
(
strict_types
=
1
);
use
MediaWiki\Extension\Translate\Validation\Validators\MatchSetValidator
;
/**
* @license GPL-2.0-or-later
* @covers \MediaWiki\Extension\Translate\Validation\Validators\MatchSetValidator
*/
class
MatchSetValidatorTest
extends
BaseValidatorTestCase
{
/** @dataProvider provideTestCases */
public
function
test
(
$constructorParams
,
...
$params
)
{
$validator
=
new
MatchSetValidator
(
$constructorParams
);
$this
->
runValidatorTests
(
$validator
,
'value-not-present'
,
...
$params
);
}
public
static
function
provideTestCases
()
{
yield
[
[
'values'
=>
[
'rtl'
,
'Ltr'
]
],
'rtl'
,
'ltr'
,
[
'invalid'
],
'Wrong case (case-sensitive) is an issue'
];
yield
[
[
'values'
=>
[
'rtl'
,
'Ltr'
],
'caseSensitive'
=>
false
],
'rtl'
,
'ltr'
,
[],
'Matching value (case-insensitive) is not an issue'
];
yield
[
[
'values'
=>
[
'rtl'
,
'etc'
]
],
'rtl'
,
'ltr'
,
[
'invalid'
],
'Wrong value (case-sensitive) is an issue'
];
}
public
function
testEmptyValues
()
{
$this
->
expectException
(
InvalidArgumentException
::
class
);
new
MatchSetValidator
(
[
'values'
=>
[],
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 21:54 (2 d, 4 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
20/44/67de7838af4f871ede6a2a6d656c
Default Alt Text
MatchSetValidatorTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment