contact = SugarTestContactUtilities::createContact(); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); SugarTestContactUtilities::removeAllCreatedContacts(); } /** * @group 47722 */ public function testImportSanitize() { $vardef = array('module' => 'Contacts', 'id_name' => 'contact_id_c', 'name' => 'test_rel_cont_c'); $value = $this->contact->first_name .' '. $this->contact->last_name; $focus = new Lead(); $settings = new ImportFieldSanitize(); $sfr = new SugarFieldRelate('relate'); $value = $sfr->importSanitize($value, $vardef, $focus, $settings); $this->assertEquals($focus->$vardef['id_name'], $this->contact->id); } } ?>