ext2 = $this->relatedModule; $field->label_value = 'TestField' . time(); $this->idLabelName = 'LBL_TEST_FIELD_ID_LABEL_B46152'; $field->saveIdLabel($this->idLabelName, $this->dynamicField); SugarTestHelper::setUp('mod_strings', array($this->module)); $this->assertArrayHasKey($this->idLabelName, $GLOBALS['mod_strings']); } public function setUp() { SugarTestHelper::setUp('beanList'); SugarTestHelper::setUp('app_list_strings'); SugarTestHelper::setUp('mod_strings', array('ModuleBuilder')); SugarTestHelper::setUp('current_user'); $this->dynamicField = new DynamicField($this->module); $this->dynamicField->setup(BeanFactory::getBean($this->module)); parent::setUp(); } public function tearDown() { ParserLabel::removeLabel( $GLOBALS['current_language'], $this->idLabelName, $GLOBALS['mod_strings'][$this->idLabelName], $this->module ); SugarTestHelper::tearDown(); parent::tearDown(); } } class TemplateRelatedTextFieldMockB46152_P3 extends TemplateRelatedTextField { public function saveIdLabel($idLabelName, $df) { parent::saveIdLabel($idLabelName, $df); } }