mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Moved unit tests
This commit is contained in:
25
tests/unit/Entity/ClientEntityTest.php
Normal file
25
tests/unit/Entity/ClientEntityTest.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace LeagueTests\Entity;
|
||||
|
||||
use League\OAuth2\Server\Entity\ClientEntity;
|
||||
use \Mockery as M;
|
||||
|
||||
class ClientTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testSetGet()
|
||||
{
|
||||
$server = M::mock('League\OAuth2\Server\AbstractServer');
|
||||
$client = (new ClientEntity($server))->hydrate([
|
||||
'id' => 'foobar',
|
||||
'secret' => 'barfoo',
|
||||
'name' => 'Test Client',
|
||||
'redirectUri' => '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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user