Updated tests

This commit is contained in:
Alex Bilbie
2014-07-11 18:19:10 +01:00
parent 48dea185d8
commit c6bc1b0cfc
13 changed files with 115 additions and 101 deletions

View File

@@ -10,9 +10,10 @@ class ScopeTest extends \PHPUnit_Framework_TestCase
public function testSetGet()
{
$server = M::mock('League\OAuth2\Server\AbstractServer');
$scope = new ScopeEntity($server);
$scope->setId('foobar');
$scope->setDescription('barfoo');
$scope = (new ScopeEntity($server))->hydrate([
'id' => 'foobar',
'description' => 'barfoo'
]);
$this->assertEquals('foobar', $scope->getId());
$this->assertEquals('barfoo', $scope->getDescription());