_file = 'tests/modules/Import/Bug58207Test.csv'; global $sugar_config; $this->_sugarConfig = $sugar_config; $sugar_config['default_export_charset'] = "SJIS"; SugarTestHelper::setUp('current_user'); } public function tearDown() { SugarTestHelper::tearDown(); global $sugar_config; $sugar_config = $this->_sugarConfig; } /** * Import a SJIS encoded file, and check if getNextRow() properly * converts all the data into UTF-8 */ public function testFileImportEncoding() { $importFile = new ImportFile($this->_file, ',', '"', FALSE, FALSE); $row = $importFile->getNextRow(); // Hardcode some Japanese strings $this->assertEquals('名前', $row[0]); $this->assertEquals('請求先郵便番号', $row[10]); $this->assertEquals('年間売上', $row[20]); $this->assertEquals('チームID', $row[30]); } }