/** * Test for PMA_getHtmlForCreateNewColumn * * @return void */ public function testPMAGetHtmlForCreateNewColumn() { $db = "PMA_db"; $table = "PMA_table"; $num_fields = 1; $result = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table); $this->assertContains('<table id="table_columns"', $result); }
//get column whose datatype falls under string category $html .= PMA_getHtmlForColumnsList($db, $table, _pgettext('string types', 'String')); echo $html; exit; } if (isset($_REQUEST['splitColumn'])) { $num_fields = $_REQUEST['numFields']; $html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table); $html .= PMA_URL_getHiddenInputs($db, $table); echo $html; exit; } if (isset($_REQUEST['addNewPrimary'])) { $num_fields = 1; $columnMeta = array('Field' => $table . "_id", 'Extra' => 'auto_increment'); $html = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table, $columnMeta); $html .= PMA_URL_getHiddenInputs($db, $table); echo $html; exit; } if (isset($_REQUEST['findPdl'])) { $html = PMA_findPartialDependencies($table, $db); echo $html; exit; } if (isset($_REQUEST['getNewTables2NF'])) { $partialDependencies = json_decode($_REQUEST['pd']); $html = PMA_getHtmlForNewTables2NF($partialDependencies, $table); echo $html; exit; }
/** * Test for PMA_getHtmlForCreateNewColumn * * @return void */ public function testPMAGetHtmlForCreateNewColumn() { $db = "PMA_db"; $table = "PMA_table"; $num_fields = 1; $result = PMA_getHtmlForCreateNewColumn($num_fields, $db, $table); $this->assertTag(array('tag' => 'table', "id" => 'table_columns'), $result); }