diff options
Diffstat (limited to 'tests/PHPUnit/Integration/DbTest.php')
-rw-r--r-- | tests/PHPUnit/Integration/DbTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/DbTest.php b/tests/PHPUnit/Integration/DbTest.php index e30de8a062..0ca35122b5 100644 --- a/tests/PHPUnit/Integration/DbTest.php +++ b/tests/PHPUnit/Integration/DbTest.php @@ -85,6 +85,21 @@ class DbTest extends IntegrationTestCase Db::destroyDatabaseObject(); } + /** + * @dataProvider getDbAdapter + */ + public function test_getRowCount($adapter, $expectedClass) + { + Db::destroyDatabaseObject(); + Config::getInstance()->database['adapter'] = $adapter; + $db = Db::get(); + // make sure test is useful and setting adapter works + $this->assertInstanceOf($expectedClass, $db); + + $result = $db->query('select 21'); + $this->assertEquals(1, $db->rowCount($result)); + } + public function getDbAdapter() { return array( |