db = new Firebird(dirname(__FILE__)."/../test_dbs/FB_TEST_DB.FDB"); $this->tables = $this->db->get_tables(); } function tearDown() { unset($this->db); unset($this->tables); } function TestConnection() { $this->assertIsA($this->db, 'Firebird'); } function TestGetTables() { $tables = $this->tables; $this->assertTrue(is_array($tables)); } function TestGetSystemTables() { $only_system = TRUE; foreach($this->tables as $t) { if(stripos($t, 'rdb$') !== 0 && stripos($t, 'mon$') !== 0) { $only_system = FALSE; break; } } $this->assertTrue($only_system); } function TestCreateDatabase() { //Attempt to create the table $sql = $this->db->manip->create_table('create_test', array('id' => 'SMALLINT')); $this->db->query($sql); //Reset $this->tearDown(); $this->setUp(); ?>
= print_r($this->tables, TRUE) ?>tables); echo "create_test exists :".(int)$table_exists.'