backupContents = file_get_contents('custom/include/generic/SugarWidgets/SugarWidgetFieldcustomname.php'); } $contents = <<backupContents)) { file_put_contents('custom/include/generic/SugarWidgets/SugarWidgetFieldcustomname.php', $this->backupContents); } else { unlink('custom/include/generic/SugarWidgets/SugarWidgetFieldcustomname.php'); } } public function testCustomSugarWidgetFilesLoaded() { require_once('include/generic/SugarWidgets/SugarWidgetReportField.php'); $customWidget = new SugarWidgetFieldCustomName(null); $this->assertEquals("Bug48369Test", $customWidget->queryFilterIs(null)); } }