Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7400675
ActionInfoTest.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
ActionInfoTest.php
View Options
<?php
use
MediaWiki\Actions\ActionInfo
;
/**
* @covers \MediaWiki\Actions\ActionInfo
*
* @author Daniel Kinzler
*/
class
ActionInfoTest
extends
MediaWikiUnitTestCase
{
public
static
function
provideSpec
()
{
yield
'true values'
=>
[
[
'name'
=>
'testing'
,
'restriction'
=>
'foo'
,
'requiresUnblock'
=>
true
,
'requiresWrite'
=>
true
,
'needsReadRights'
=>
true
,
]
];
yield
'false values'
=>
[
[
'name'
=>
'testing'
,
'restriction'
=>
null
,
'requiresUnblock'
=>
false
,
'requiresWrite'
=>
false
,
'needsReadRights'
=>
false
,
]
];
}
/**
* @dataProvider provideSpec
*/
public
function
testGetters
(
array
$spec
)
{
$info
=
new
ActionInfo
(
$spec
);
$this
->
assertSame
(
$spec
[
'name'
],
$info
->
getName
()
);
$this
->
assertSame
(
$spec
[
'restriction'
],
$info
->
getRestriction
()
);
$this
->
assertSame
(
$spec
[
'requiresUnblock'
],
$info
->
requiresUnblock
()
);
$this
->
assertSame
(
$spec
[
'requiresWrite'
],
$info
->
requiresWrite
()
);
$this
->
assertSame
(
$spec
[
'needsReadRights'
],
$info
->
needsReadRights
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 16:52 (10 h, 51 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
76/05/bec35ee7144a4ca9c5c54a4c0e2f
Default Alt Text
ActionInfoTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment