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

@ -8,6 +8,7 @@ class Authentication_Server_test extends PHPUnit_Framework_TestCase {
require_once('database_mock.php'); require_once('database_mock.php');
$this->oauthdb = new OAuthdb(); $this->oauthdb = new OAuthdb();
$this->assertInstanceOf('Oauth2\Authentication\Database', $this->oauthdb);
$this->oauth->registerDbAbstractor($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->server = new Oauth2\Resource\Server();
$this->db = new ResourceDB(); $this->db = new ResourceDB();
$this->assertInstanceOf('Oauth2\Resource\Database', $this->db);
$this->server->registerDbAbstractor($this->db); $this->server->registerDbAbstractor($this->db);
} }