doImport() public method

Handles the whole import logic
public doImport ( &$sql_data = [] ) : void
return void
Example #1
0
 /**
  * Test for doImport for _getAnalyze = false, should be OK as well
  *
  * @return void
  *
  * @group medium
  */
 public function testDoImportNotAnalysis()
 {
     //$sql_query_disabled will show the import SQL detail
     global $sql_query, $sql_query_disabled;
     $sql_query_disabled = false;
     //Test function called
     $this->object->doImport();
     //asset that all sql are executed
     $this->assertContains('CREATE DATABASE IF NOT EXISTS `CSV_DB` DEFAULT CHARACTER', $sql_query);
     $this->assertContains('CREATE TABLE IF NOT EXISTS `CSV_DB`.`TBL_NAME`', $sql_query);
     $this->assertEquals(true, $GLOBALS['finished']);
 }