'; } function getMySugarChartResources() { return ' '; } function display(\$name, \$xmlFile, \$width='320', \$height='480', \$resize=false) { parent::display(\$name, \$xmlFile, \$width, \$height, \$resize); return \$this->ss->fetch('include/SugarCharts/Jit/tpls/chart.tpl'); } function getDashletScript(\$id,\$xmlFile="") { parent::getDashletScript(\$id,\$xmlFile); return \$this->ss->fetch('include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl'); } } ?> EOQ; $fp = sugar_fopen('custom/include/SugarCharts/CustomSugarChartFactory/CustomSugarChartFactory.php', "w"); fwrite($fp, $the_string ); fclose($fp ); } public function tearDown() { rmdir_recursive('custom/include/SugarCharts/CustomSugarChartFactory'); } public function testCustomFactory() { $sugarChart = SugarChartFactory::getInstance('CustomSugarChartFactory'); $name = get_class($sugarChart); $this->assertEquals('CustomSugarChartFactory', $name, 'Assert engine is CustomSugarChartFactory'); } }