/**
  * Test for PMA_getHtmlForIndexTypeOption
  *
  * @return void
  */
 public function testGetHtmlForIndexTypeOption()
 {
     $cmeta = array('Key' => 'PRI');
     $result = PMA_getHtmlForIndexTypeOption(2, $cmeta, 'INT', 'PRI');
     $this->assertContains('<option value="int_2" title="INT" selected="selected">INT</option>', $result);
 }
/**
 * Function to get html for the column indexes
 *
 * @param int   $columnNumber column number
 * @param int   $ci           cell index
 * @param int   $ci_offset    cell index offset
 * @param array $columnMeta   column meta
 *
 * @return string
 */
function PMA_getHtmlForColumnIndexes($columnNumber, $ci, $ci_offset, $columnMeta)
{
    $html = '<select name="field_key[' . $columnNumber . ']"' . ' id="field_' . $columnNumber . '_' . ($ci - $ci_offset) . '" data-index="">';
    $html .= '<option value="none_' . $columnNumber . '">---</option>';
    $html .= PMA_getHtmlForIndexTypeOption($columnNumber, $columnMeta, 'Primary', 'PRI');
    $html .= PMA_getHtmlForIndexTypeOption($columnNumber, $columnMeta, 'Unique', 'UNI');
    $html .= PMA_getHtmlForIndexTypeOption($columnNumber, $columnMeta, 'Index', 'MUL');
    if (!PMA_DRIZZLE) {
        $html .= PMA_getHtmlForIndexTypeOption($columnNumber, $columnMeta, 'Fulltext', 'FULLTEXT');
    }
    $html .= '</select>';
    return $html;
}
    /**
     * Test for PMA_getHtmlForIndexTypeOption
     *
     * @return void
     */
    public function testGetHtmlForIndexTypeOption()
    {
        $cmeta = array(
            'Key' => 'PRI'
        );

        $result = PMA_getHtmlForIndexTypeOption(
            2, $cmeta, 'INT', 'PRI'
        );

        $this->assertTag(
            PMA_getTagArray(
                '<option value="int_2" title="INT" selected="selected">',
                array('content' => 'INT')
            ),
            $result
        );
    }