SQLite tests
This commit is contained in:
parent
7b4f00085b
commit
dc6c9bf141
@ -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();
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user