mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-30 02:33:14 +05:30
Assert that mock database objects are proper instances of their interfaces
This commit is contained in:
parent
337b2e0a92
commit
5da9088410
@ -5,9 +5,10 @@ class Authentication_Server_test extends PHPUnit_Framework_TestCase {
|
||||
function setUp()
|
||||
{
|
||||
$this->oauth = new Oauth2\Authentication\Server();
|
||||
|
||||
|
||||
require_once('database_mock.php');
|
||||
$this->oauthdb = new OAuthdb();
|
||||
$this->assertInstanceOf('Oauth2\Authentication\Database', $this->oauthdb);
|
||||
$this->oauth->registerDbAbstractor($this->oauthdb);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ class Resource_Server_test extends PHPUnit_Framework_TestCase {
|
||||
$this->server = new Oauth2\Resource\Server();
|
||||
$this->db = new ResourceDB();
|
||||
|
||||
$this->assertInstanceOf('Oauth2\Resource\Database', $this->db);
|
||||
$this->server->registerDbAbstractor($this->db);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user