function save($check_notify = FALSE) { if (empty($this->id)) { unset($_POST['aor_conditions_id']); unset($_POST['aor_fields_id']); } parent::save($check_notify); require_once 'modules/AOR_Fields/AOR_Field.php'; $condition = new AOR_Field(); $condition->save_lines($_POST, $this, 'aor_fields_'); require_once 'modules/AOR_Conditions/AOR_Condition.php'; $condition = new AOR_Condition(); $condition->save_lines($_POST, $this, 'aor_conditions_'); require_once 'modules/AOR_Charts/AOR_Chart.php'; $chart = new AOR_Chart(); $chart->save_lines($_POST, $this, 'aor_chart_'); }
function save($check_notify = FALSE) { // TODO: process of saveing the fields and conditions is too long so we will have to make some optimization on save_lines functions set_time_limit(3600); if (empty($this->id)) { unset($_POST['aor_conditions_id']); unset($_POST['aor_fields_id']); } parent::save($check_notify); require_once 'modules/AOR_Fields/AOR_Field.php'; $field = new AOR_Field(); $field->save_lines($_POST, $this, 'aor_fields_'); require_once 'modules/AOR_Conditions/AOR_Condition.php'; $condition = new AOR_Condition(); $condition->save_lines($_POST, $this, 'aor_conditions_'); require_once 'modules/AOR_Charts/AOR_Chart.php'; $chart = new AOR_Chart(); $chart->save_lines($_POST, $this, 'aor_chart_'); }
public function testsave_lines() { $this->markTestSkipped('Skipping AOR Charts Tests'); error_reporting(E_ERROR | E_PARSE); $aorChart = new AOR_Chart(); //preset the required data $post = array(); $post['chartid'] = array('test' => ''); $post['charttitle'] = array('test' => 'test'); $post['charttype'] = array('test' => 'bar'); $post['chartx_field'] = array('test' => '1'); $post['charty_field'] = array('test' => '2'); $postKey = 'chart'; $bean = new AOR_Report(); //execute the method and test if it works and does not throws an exception. try { $result = $aorChart->save_lines($post, $bean, $postKey); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }