/**
  * Test for PMA_getHTMLforAddCentralColumn
  *
  * @return void
  */
 public function testPMAGetHTMLforAddCentralColumn()
 {
     $result = PMA_getHTMLforAddCentralColumn(20, 0, 'phpmyadmin');
     $this->assertContains('<table', $result);
     $this->assertContains('<form', $result);
     $this->assertContains(PMA_URL_getHiddenInputs('phpmyadmin') . '<input type="hidden" name="add_column" value="add">' . '<input type="hidden" name="pos" value="0" />' . '<input type="hidden" name="total_rows" value="20"/>', $result);
 }
if (isset($_REQUEST['pos'])) {
    $pos = $_REQUEST['pos'];
} else {
    $pos = 0;
}
$addNewColumn = PMA_getHTMLforAddNewColumn($db);
$response->addHTML($addNewColumn);
if ($total_rows <= 0) {
    $response->addHTML('<fieldset>' . __('The central list of columns for the current database is empty.') . '</fieldset>');
    $columnAdd = PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db);
    $response->addHTML($columnAdd);
    exit;
}
$table_navigation_html = PMA_getHTMLforTableNavigation($total_rows, $pos, $db);
$response->addHTML($table_navigation_html);
$columnAdd = PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db);
$response->addHTML($columnAdd);
$deleteRowForm = '<form method="post" id="del_form" action="db_central_columns.php">' . PMA_URL_getHiddenInputs($db) . '<input id="del_col_name" type="hidden" name="col_name" value="">' . '<input type="hidden" name="pos" value="' . $pos . '">' . '<input type="hidden" name="delete_save" value="delete"></form>';
$response->addHTML($deleteRowForm);
$table_struct = '<div id="tableslistcontainer">' . '<form name="tableslistcontainer">' . '<table id="table_columns" class="tablesorter" ' . 'style="min-width:100%" class="data">';
$response->addHTML($table_struct);
$tableheader = PMA_getCentralColumnsTableHeader('column_heading', __('Click to sort.'), 2);
$response->addHTML($tableheader);
$result = PMA_getColumnsList($db, $pos, $max_rows);
$odd_row = true;
$row_num = 0;
foreach ($result as $row) {
    $tableHtmlRow = PMA_getHTMLforCentralColumnsTableRow($row, $odd_row, $row_num, $db);
    $response->addHTML($tableHtmlRow);
    $odd_row = !$odd_row;
    $row_num++;