con = new MysqlConnection($GLOBALS['CONFIG']['db']['core']['masters']['admin']); } public function testMysqlDrop() { $query = new Builder($this->con); $sql = 'DROP DATABASE `test`;'; self::assertEquals($sql, $query->drop('test')->toSql()); } public function testMysqlShowTables() { $query = new Builder($this->con); $sql = 'SELECT `table_name` FROM `information_schema`.`tables` WHERE `information_schema`.`tables`.`table_schema` = \'' . $GLOBALS['CONFIG']['db']['core']['masters']['admin']['database']. '\';'; self::assertEquals($sql, $query->selectTables()->toSql()); } public function testMysqlShowFields() { $query = new Builder($this->con); $sql = 'SELECT * FROM `information_schema`.`columns` WHERE `information_schema`.`columns`.`table_schema` = \'' . $GLOBALS['CONFIG']['db']['core']['masters']['admin']['database']. '\' AND `information_schema`.`columns`.`table_name` = \'test\';'; self::assertEquals($sql, $query->selectFields('test')->toSql()); } }