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