Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4112513
ClaimEntityTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
972 B
Referenced Files
None
Subscribers
None
ClaimEntityTest.php
View Options
<?php
namespace
MediaWiki\Extension\OAuth\Tests\Entity
;
use
MediaWiki\Extension\OAuth\Entity\ClaimEntity
;
use
MediaWikiIntegrationTestCase
;
/**
* @group OAuth
*/
class
ClaimEntityTest
extends
MediaWikiIntegrationTestCase
{
public
static
function
provideClaims
()
{
yield
'string claim'
=>
[
[
'str'
=>
'string'
]
];
yield
'number claim'
=>
[
[
'num'
=>
9
]
];
yield
'list of claims'
=>
[
[
'class'
=>
'dummy class'
,
'another_item'
=>
[
'num'
=>
8
,
'str'
=>
'mock'
]
]
];
}
/**
* @dataProvider provideClaims
* @covers \MediaWiki\Extension\OAuth\Entity\ClaimEntity::getName
* @covers \MediaWiki\Extension\OAuth\Entity\ClaimEntity::getValue
*/
public
function
testProperties
(
$claims
)
{
foreach
(
$claims
as
$name
=>
$value
)
{
$claimEntity
=
new
ClaimEntity
(
$name
,
$value
);
$this
->
assertEquals
(
$name
,
$claimEntity
->
getName
()
);
$this
->
assertEquals
(
$value
,
$claimEntity
->
getValue
()
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 22:53 (12 h, 10 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1b/a9/71e377d9636030cfcd41143b05dc
Default Alt Text
ClaimEntityTest.php (972 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment