SQLite tests

This commit is contained in:
Timothy Warren 2012-02-07 20:31:36 -05:00
parent 7b4f00085b
commit dc6c9bf141
2 changed files with 8 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class SQLite_manip extends db_manip {
* @param array $indexes // column => index pairs
* @return string
*/
function create_table($name, $columns, $constraints=array())
function create_table($name, $columns, $constraints=array(), $indexes=array())
{
$column_array = array();

View File

@ -29,12 +29,17 @@ class SQLiteTest extends UnitTestCase {
{
parent::__construct();
$this->db = new SQLite("./test_dbs/test_sqlite.db");
$this->db = new SQLite(dirname(__FILE__)."/../test_dbs/test_sqlite.db");
}
function TestConnection()
{
$this->assertIsA($this->db, 'SQLite');
}
function TestGetTables()
{
$tables = $this->db->get_tables();
$this->assertEqual($tables[0]['name'], 'test');
}
}