public function test_language_survey_pt_it() { $survey_pt_it = new OR_xform_results(or_xform_results_helper_test::FILE_PATH . 'survey_pt_it/survey_pt_it.xml'); // We know that the parsing works. // Now we just need to test the language variant. // By default is English. // However in this file there's no English so the default should be // Portuguese because it comes first. $result = $survey_pt_it->parse_result_file(or_xform_results_helper_test::FILE_PATH . 'survey_pt_it/survey_pt_it_1.xml'); $this->assertEquals("Qual é o teu nome?", $result[0]['label']); // Set to Italian language $survey_pt_it->set_language('Italiano'); $result = $survey_pt_it->parse_result_file(or_xform_results_helper_test::FILE_PATH . 'survey_pt_it/survey_pt_it_1.xml'); $this->assertEquals("Qual'è il tuo nome?", $result[0]['label']); }