2014-01-16 22:21:06 +05:30
|
|
|
<?php
|
|
|
|
|
2014-05-02 19:42:15 +05:30
|
|
|
namespace LeagueTests\Entity;
|
2014-01-16 22:21:06 +05:30
|
|
|
|
2014-05-02 19:42:15 +05:30
|
|
|
use League\OAuth2\Server\Entity\ScopeEntity;
|
2014-01-16 22:21:06 +05:30
|
|
|
use \Mockery as M;
|
|
|
|
|
2014-05-03 15:25:25 +05:30
|
|
|
class ScopeTest extends \PHPUnit_Framework_TestCase
|
2014-01-16 22:21:06 +05:30
|
|
|
{
|
|
|
|
public function testSetGet()
|
|
|
|
{
|
|
|
|
$server = M::mock('League\OAuth2\Server\AbstractServer');
|
2014-05-02 21:51:53 +05:30
|
|
|
$scope = new ScopeEntity($server);
|
2014-01-16 22:21:06 +05:30
|
|
|
$scope->setId('foobar');
|
|
|
|
$scope->setDescription('barfoo');
|
|
|
|
|
|
|
|
$this->assertEquals('foobar', $scope->getId());
|
|
|
|
$this->assertEquals('barfoo', $scope->getDescription());
|
|
|
|
}
|
2014-05-03 15:25:25 +05:30
|
|
|
}
|