public function setUp() { $connDetails = array('host' => 'localhost', 'dbname' => 'potatorm', 'user' => 'andela', 'pass' => 'andela'); DbQuerries::connect($connDetails); Model::setTableName("cars"); DbSettingTest::createTable(Model::getTableName()); }
public static function dropTable($tableName) { $connDetails = array('host' => 'localhost', 'dbname' => 'potatorm', 'user' => 'andela', 'pass' => 'andela'); $connect = DbQuerries::connect($connDetails); try { $connect->exec("DROP TABLE IF EXISTS {$tableName}"); } catch (Exception $e) { echo $e->getMessage(); } }