mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Updated tests
This commit is contained in:
26
tests/AbstractServerTest.php
Normal file
26
tests/AbstractServerTest.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace LeagueTests;
|
||||
|
||||
use LeagueTests\Stubs\StubAbstractServer;
|
||||
use \Mockery as M;
|
||||
|
||||
class AbstractTokenTests extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
function testSetGet()
|
||||
{
|
||||
$server = new StubAbstractServer();
|
||||
$this->assertTrue($server->getRequest() instanceof \Symfony\Component\HttpFoundation\Request);
|
||||
|
||||
$server2 = new StubAbstractServer();
|
||||
$server2->setRequest((new \Symfony\Component\HttpFoundation\Request));
|
||||
$this->assertTrue($server2->getRequest() instanceof \Symfony\Component\HttpFoundation\Request);
|
||||
}
|
||||
|
||||
function testGetStorageException()
|
||||
{
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\ServerException');
|
||||
$server = new StubAbstractServer();
|
||||
$server->getStorage('foobar');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user