mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
24 lines
596 B
PHP
24 lines
596 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Entity;
|
|
|
|
use League\OAuth2\Server\Entity\ScopeEntity;
|
|
use Mockery as M;
|
|
|
|
class ScopeEntityTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testSetGet()
|
|
{
|
|
$server = M::mock('League\OAuth2\Server\AbstractServer');
|
|
$scope = (new ScopeEntity($server))->hydrate([
|
|
'id' => 'foobar',
|
|
'description' => 'barfoo',
|
|
]);
|
|
|
|
$this->assertEquals('foobar', $scope->getId());
|
|
$this->assertEquals('barfoo', $scope->getDescription());
|
|
|
|
$this->assertTrue(is_array($scope->jsonSerialize()));
|
|
}
|
|
}
|