2012-02-02 19:04:10 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* OpenSQLManager
|
|
|
|
*
|
|
|
|
* Free Database manager for Open Source Databases
|
|
|
|
*
|
|
|
|
* @author Timothy J. Warren
|
|
|
|
* @copyright Copyright (c) 2012
|
|
|
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
|
|
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* FirebirdTest class.
|
|
|
|
*
|
|
|
|
* @extends UnitTestCase
|
|
|
|
*/
|
|
|
|
class FirebirdTest extends UnitTestCase {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* __construct function.
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
2012-02-07 08:45:56 -05:00
|
|
|
|
|
|
|
$this->db = new Firebird(dirname(__FILE__)."/../test_dbs/FB_TEST_DB.FDB");
|
2012-02-02 19:04:10 -05:00
|
|
|
}
|
2012-02-07 08:18:38 -05:00
|
|
|
|
|
|
|
function TestConnection()
|
|
|
|
{
|
2012-02-07 08:45:56 -05:00
|
|
|
$this->assertIsA($this->db, 'Firebird');
|
2012-02-07 08:18:38 -05:00
|
|
|
}
|
2012-02-08 15:05:28 -05:00
|
|
|
|
2012-02-08 15:39:41 -05:00
|
|
|
/*function TestGetTables()
|
2012-02-08 15:05:28 -05:00
|
|
|
{
|
|
|
|
$tables = $this->db->get_tables();
|
|
|
|
|
|
|
|
print_r($tables);
|
|
|
|
}
|
2012-02-08 13:42:49 -05:00
|
|
|
|
|
|
|
function TestCreateDatabase()
|
|
|
|
{
|
2012-02-08 15:05:28 -05:00
|
|
|
//Attempt to create the table
|
|
|
|
$sql = $this->db->manip->create_table('create_test', array('id' => 'SMALLINT'), array('id' => 'PRIMARY KEY'));
|
|
|
|
$this->db->query($sql);
|
2012-02-08 13:42:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
function TestDeleteDatabase()
|
|
|
|
{
|
2012-02-08 15:05:28 -05:00
|
|
|
$sql = $this->db->manip->delete_table('create_test');
|
|
|
|
$this->db->query($sql);
|
2012-02-08 15:39:41 -05:00
|
|
|
}*/
|
2012-02-02 19:04:10 -05:00
|
|
|
}
|