Assert that mock database objects are proper instances of their interfaces

This commit is contained in:
Alex Bilbie 2012-08-27 14:43:12 +01:00
parent 337b2e0a92
commit 5da9088410
2 changed files with 3 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);
}