Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4117309
HooksTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
980 B
Referenced Files
None
Subscribers
None
HooksTest.php
View Options
<?php
namespace
MediaWiki\Extension\VisualEditor\Tests
;
use
MediaWiki\Config\HashConfig
;
use
MediaWiki\Extension\VisualEditor\Hooks
;
use
MediaWikiIntegrationTestCase
;
/**
* @covers \MediaWiki\Extension\VisualEditor\Hooks
* @group Database
*/
class
HooksTest
extends
MediaWikiIntegrationTestCase
{
/**
* @dataProvider provideOnResourceLoaderGetConfigVars
*/
public
function
testOnResourceLoaderGetConfigVars
(
array
$config
,
array
$expected
)
{
$this
->
overrideConfigValues
(
$config
);
$vars
=
[];
(
new
Hooks
()
)->
onResourceLoaderGetConfigVars
(
$vars
,
''
,
new
HashConfig
()
);
$this
->
assertArrayHasKey
(
'wgVisualEditorConfig'
,
$vars
);
$veConfig
=
$vars
[
'wgVisualEditorConfig'
];
foreach
(
$expected
as
$name
=>
$value
)
{
$this
->
assertArrayHasKey
(
$name
,
$veConfig
);
$this
->
assertSame
(
$value
,
$veConfig
[
$name
]
);
}
}
public
static
function
provideOnResourceLoaderGetConfigVars
()
{
yield
[
[],
[]
];
// TODO: test a lot more config!
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 02:07 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b3/a7/3c5c3d3549c0b46b911170b3fae0
Default Alt Text
HooksTest.php (980 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment