Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7445901
MediaWikiLinkValidatorTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
931 B
Referenced Files
None
Subscribers
None
MediaWikiLinkValidatorTest.php
View Options
<?php
declare
(
strict_types
=
1
);
use
MediaWiki\Extension\Translate\Validation\Validators\MediaWikiLinkValidator
;
/**
* @license GPL-2.0-or-later
* @covers \MediaWiki\Extension\Translate\Validation\Validators\MediaWikiLinkValidator
*/
class
MediaWikiLinkValidatorTest
extends
BaseValidatorTestCase
{
/** @dataProvider provideTestCases */
public
function
test
(
...
$params
)
{
$this
->
runValidatorTests
(
new
MediaWikiLinkValidator
(),
'links'
,
...
$params
);
}
public
static
function
provideTestCases
()
{
yield
[
'[[$3|Hello]] [[#Hello|Hello World]]'
,
'Hello world'
,
[
'missing'
],
'Two links missing is an issue'
];
yield
[
'[[$3|Hello]] [[#Hello|Hello World]]'
,
'[[$3|Hola]] [[#Hello|Hey]]'
,
[],
'All links present, no issue'
];
yield
[
'[[$3|Hello]] [[#Hello|Hello World]]'
,
'[[$3|Food]] [[#Hey|Hey]]'
,
[
'missing'
,
'extra'
],
'One link changed is two issues'
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 18:23 (1 d, 7 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bd/ad/622a601d24248f49c3e30088740f
Default Alt Text
MediaWikiLinkValidatorTest.php (931 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment