module.'/language/en_us.lang.php')) { unlink('custom/modules/'.$this->module.'/language/en_us.lang.php'); } if(file_exists('custom/modules/'.$this->add_module.'/language/en_us.lang.php')) { unlink('custom/modules/'.$this->add_module.'/language/en_us.lang.php'); } SugarTestHelper::tearDown(); parent::tearDown(); } /** * @return array */ public function getRequestData() { return array ( 'name' => $this->field_name, 'view_module' => $this->module, 'label' => 'LBL_' . strtoupper($this->field_name), 'labelValue' => $this->field_name, ); } /** * @group 51172 * Check that the label custom fields of Employees module was saved also for Users module * * @return void */ public function testSaveLabelForCustomFields() { $_REQUEST = $this->getRequestData(); $mb = new ModuleBuilderController(); $mb ->action_SaveLabel(); $mod_strings = return_module_language($GLOBALS['current_language'], $this->add_module); //assert that array $mod_strings Users module contains current label $this->assertArrayHasKey( $_REQUEST['label'], $mod_strings); } }