contact = new Contact(); $this->contact->field_defs["as_tetrispe_accounts_name"] = array ( 'name' => 'as_tetrispe_accounts_name', 'type' => 'relate', 'source' => 'non-db', 'vname' => 'LBL_AS_TETRISPERSON_ACCOUNTS_FROM_ACCOUNTS_TITLE', 'save' => true, 'id_name' => 'as_tetrispac95ccounts_ida', 'link' => 'as_tetrisperson_accounts', 'table' => 'accounts', 'module' => 'Accounts', 'rname' => 'name', ); $this->contact->field_defs["as_tetrispac95ccounts_ida"] = array ( 'name' => 'as_tetrispac95ccounts_ida', 'type' => 'link', 'relationship' => 'as_tetrisperson_accounts', 'source' => 'non-db', 'reportable' => false, 'side' => 'right', 'vname' => 'LBL_AS_TETRISPERSON_ACCOUNTS_FROM_AS_TETRISPERSON_TITLE', ); } /** * Test getting import fields from a bean when a relationship has been defined and the id field is only defined as a link * and not a relate entry. The id field should be exposed so that users can select it from a list during the import process. * * @return void */ public function testGetImportableFields() { $c = new Contact(); $importableFields = $c->get_importable_fields(); $this->assertTrue(isset($importableFields['as_tetrispac95ccounts_ida'])); } }