mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 02:08:56 +05:30
24 lines
727 B
PHP
24 lines
727 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Entities;
|
|
|
|
use League\OAuth2\Server\Entity\Client;
|
|
use \Mockery as M;
|
|
|
|
class ClientTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testSetGet()
|
|
{
|
|
$server = M::mock('League\OAuth2\Server\AbstractServer');
|
|
$client = new Client($server);
|
|
$client->setId('foobar');
|
|
$client->setSecret('barfoo');
|
|
$client->setName('Test Client');
|
|
$client->setRedirectUri('http://foo/bar');
|
|
|
|
$this->assertEquals('foobar', $client->getId());
|
|
$this->assertEquals('barfoo', $client->getSecret());
|
|
$this->assertEquals('Test Client', $client->getName());
|
|
$this->assertEquals('http://foo/bar', $client->getRedirectUri());
|
|
}
|
|
} |