/** * Test tries to assert related field in array which was filtered by template_filter * * @group 34785 * @return void */ public function testRelatedField() { $module = new SugarBean(); $varDefHandler = new VarDefHandler($module, 'template_filter'); $module->module_dir = 'Account'; $module->field_defs = array('bug_field_c' => array('name' => 'bug_field_c', 'source' => 'non-db', 'type' => 'relate')); $this->assertArrayHasKey('bug_field_c', $varDefHandler->get_vardef_array(true), 'Related field is not exist!'); }
/** * Overriden to filter legacy pre-5.1 calls and meetings * @see VarDefHandler::get_vardef_array() */ public function get_vardef_array($use_singular = false, $remove_dups = false, $use_field_name = false, $use_field_label = false) { $options_array = parent::get_vardef_array($use_singular, $remove_dups, $use_field_name, $use_field_label); if ($this->meta_array_name == 'rel_filter') { unset($options_array['oldcalls'], $options_array['oldmeetings']); } return $options_array; }
/** * Reportable fields must be available in workflow * @dataProvider provider * @group 34880 */ public function testReportableFieldsMustBeAvailableInWorkflow($action) { $def = array('reportable' => ''); $obj = new VarDefHandler('', $action); $this->assertTrue($obj->compare_type($def), "reportable fields should be available in workflow"); }