Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4139381
ScopeRepositoryTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
940 B
Referenced Files
None
Subscribers
None
ScopeRepositoryTest.php
View Options
<?php
namespace
MediaWiki\Extension\OAuth\Tests\Repository
;
use
MediaWiki\Extension\OAuth\Entity\ScopeEntity
;
use
MediaWiki\Extension\OAuth\Repository\ScopeRepository
;
use
MediaWikiIntegrationTestCase
;
/**
* @covers \MediaWiki\Extension\OAuth\Repository\ScopeRepository
* @group OAuth
*/
class
ScopeRepositoryTest
extends
MediaWikiIntegrationTestCase
{
public
function
testScopes
()
{
$repo
=
new
ScopeRepository
();
$this
->
assertInstanceOf
(
ScopeEntity
::
class
,
$repo
->
getScopeEntityByIdentifier
(
'editpage'
),
'Scope
\"
editpage
\"
should be a valid scope'
);
$this
->
assertInstanceOf
(
ScopeEntity
::
class
,
$repo
->
getScopeEntityByIdentifier
(
'mwoauth-authonlyprivate'
),
'Scope
\"
mwoauth-authonlyprivate
\"
should be a valid scope'
);
$this
->
assertNotInstanceOf
(
ScopeEntity
::
class
,
$repo
->
getScopeEntityByIdentifier
(
'dummynonexistent'
),
'Scope
\"
dummynonexistent
\"
should not be a valid scope'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 15:03 (3 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c6/5e/a3496822889a5621b9d23c8c8d64
Default Alt Text
ScopeRepositoryTest.php (940 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment