Page MenuHomeWickedGov Phorge

ClaimEntityTest.php
No OneTemporary

Size
972 B
Referenced Files
None
Subscribers
None

ClaimEntityTest.php

<?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

Mime Type
text/x-php
Expires
Tue, Aug 18, 22:53 (12 h, 57 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1b/a9/71e377d9636030cfcd41143b05dc
Default Alt Text
ClaimEntityTest.php (972 B)

Event Timeline