Esempio n. 1
0
 /**
  * Test for PMA_getHtmlForNormalizetable
  *
  * @return void
  */
 public function testPMAGetHtmlForNormalizetable()
 {
     $result = PMA_getHtmlForNormalizetable();
     $this->assertContains('<form method="post" action="normalization.php"' . ' name="normalize" id="normalizeTable"', $result);
     $this->assertContains('<input type="hidden" name="step1" value="1">', $result);
     $choices = array('1nf' => __('First step of normalization (1NF)'), '2nf' => __('Second step of normalization (1NF+2NF)'), '3nf' => __('Third step of normalization (1NF+2NF+3NF)'));
     $html_tmp = PMA_Util::getRadioFields('normalizeTo', $choices, '1nf', true);
     $this->assertContains($html_tmp, $result);
 }
Esempio n. 2
0
    $html = PMA_getHtmlFor1NFStep1($db, $table, $normalForm);
    $response->addHTML($html);
} else {
    if (isset($_REQUEST['step2'])) {
        $res = PMA_getHtmlContentsFor1NFStep2($db, $table);
        $response->addJSON($res);
    } else {
        if (isset($_REQUEST['step3'])) {
            $res = PMA_getHtmlContentsFor1NFStep3($db, $table);
            $response->addJSON($res);
        } else {
            if (isset($_REQUEST['step4'])) {
                $res = PMA_getHtmlContentsFor1NFStep4($db, $table);
                $response->addJSON($res);
            } else {
                if (isset($_REQUEST['step']) && $_REQUEST['step'] == 2.1) {
                    $res = PMA_getHtmlFor2NFstep1($db, $table);
                    $response->addJSON($res);
                } else {
                    if (isset($_REQUEST['step']) && $_REQUEST['step'] == 3.1) {
                        $tables = $_REQUEST['tables'];
                        $res = PMA_getHtmlFor3NFstep1($db, $tables);
                        $response->addJSON($res);
                    } else {
                        $response->addHTML(PMA_getHtmlForNormalizetable());
                    }
                }
            }
        }
    }
}
 /**
  * Test for PMA_getHtmlForNormalizetable
  *
  * @return void
  */
 public function testPMAGetHtmlForNormalizetable()
 {
     $result = PMA_getHtmlForNormalizetable();
     $this->assertTag(array('tag' => 'form', 'attributes' => array('action' => 'normalization.php', 'id' => 'normalizeTable')), $result);
     $this->assertContains('<input type="hidden" name="step1" value="1">', $result);
     $choices = array('1nf' => __('First step of normalization (1NF)'), '2nf' => __('Second step of normalization (1NF+2NF)'), '3nf' => __('Third step of normalization (1NF+2NF+3NF)'));
     $html_tmp = PMA_Util::getRadioFields('normalizeTo', $choices, '1nf', true);
     $this->assertContains($html_tmp, $result);
 }