$res = PMA_createNewTablesFor2NF($partialDependencies, $tablesName, $table, $db); $response->addJSON($res); exit; } if (isset($_REQUEST['createNewTables3NF'])) { $newtables = json_decode($_REQUEST['newTables']); $res = PMA_createNewTablesFor3NF($newtables, $db); $response->addJSON($res); exit; } if (isset($_POST['repeatingColumns'])) { $repeatingColumns = $_POST['repeatingColumns']; $newTable = $_POST['newTable']; $newColumn = $_POST['newColumn']; $primary_columns = $_POST['primary_columns']; $res = PMA_moveRepeatingGroup($repeatingColumns, $primary_columns, $newTable, $newColumn, $table, $db); $response->addJSON($res); exit; } if (isset($_REQUEST['step1'])) { $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 {
/** * Test for PMA_moveRepeatingGroup * * @return void */ public function testPMAMoveRepeatingGroup() { $repeatingColumns = 'col1, col2'; $primary_columns = 'id,col1'; $newTable = 'PMA_newTable'; $newColumn = 'PMA_newCol'; $table = "PMA_table"; $db = 'PMA_db'; $result = PMA_moveRepeatingGroup($repeatingColumns, $primary_columns, $newTable, $newColumn, $table, $db); $this->assertInternalType('array', $result); $this->assertArrayHasKey('queryError', $result); $this->assertArrayHasKey('message', $result); $this->assertInstanceOf('PMA_Message', $result['message']); }