module_installer = new ModuleInstaller(); $this->module_installer->silent = true; $this->module_installer->base_dir = ''; $this->module_installer->id_name = 'Bug41829Test'; $this->module_installer->installdefs['dcaction'] = array( array( 'from' => '/dcaction_file.php', ), ); $this->log = $GLOBALS['log']; $GLOBALS['log'] = new SugarMockLogger(); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); $GLOBALS['log'] = $this->log; } public function testWarningOnUninstallDCActions() { $this->module_installer->uninstall_dcactions(); $this->assertTrue(in_array('DEBUG: Uninstalling DCActions ...' . str_replace('', $this->module_installer->base_dir, $this->module_installer->installdefs['dcaction'][0]['from']), $GLOBALS['log']->messages)); } }