public function test_get_file_path() { $data = array('srid' => 1, 'files' => array('xml' => 'survey_result_1_1_1.xml')); $survey_result = new Survey_result_entity($data); $this->assertEquals('survey_result_1_1_1.xml', $survey_result->get_xml_full_path()); $survey_result->set_file_location('file/location/'); $this->assertEquals('file/location/survey_result_1_1_1.xml', $survey_result->get_xml_full_path()); }
/** * Creates Survey_result_entity injecting dependencies. * Input params must be the same as in the __construct * * @access public * @static * * @param array * Data to construct the Survey Result. * * @return Survey_result_entity */ public static function build($survey_result_data) { $CI = get_instance(); $survey_result = new Survey_result_entity($survey_result_data); $survey_result->set_file_location($CI->config->item('aw_survey_results_location')); return $survey_result; }