Page MenuHomeWickedGov Phorge

ScopeRepositoryTest.php
No OneTemporary

Size
940 B
Referenced Files
None
Subscribers
None

ScopeRepositoryTest.php

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

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)

Event Timeline