oauth2-server/tests/Entity/ScopeEntityTest.php

23 lines
573 B
PHP
Raw Normal View History

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;
2014-05-03 10:55:25 +01:00
class ScopeTest extends \PHPUnit_Framework_TestCase
2014-01-16 16:51:06 +00:00
{
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());
2014-05-08 11:55:04 +01:00
$this->assertTrue(is_array($scope->jsonSerialize()));
2014-01-16 16:51:06 +00:00
}
2014-05-03 10:55:25 +01:00
}