2 require_once('modules/InboundEmail/InboundEmail.php');
7 class Bug44009Test extends Sugar_PHPUnit_Framework_TestCase
12 public function setUp()
14 $this->ie = new InboundEmail();
17 public function getData()
20 array("test<b>test</b>", "test<b>test</b>"),
21 array("<html>test<b>test</b></html>", "test<b>test</b>"),
22 array("<html><head></head><body>test<b>test</b></body></html>", "test<b>test</b>"),
23 array("<html><head><style>test</style></head><body>test<b>test</b></body></html>", "test<b>test</b>"),
24 array("<html><head></head><body><script language=\"javascript\">alert('test!');</script>test<b>test</b></body></html>", "test<b>test</b>"),
25 array("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" /><title>test 12345</title></head><body><p>test<b>test</b></body></html>", "<p>test<b>test</b></p>"),
30 * @dataProvider getData
33 function testEmailCleanup($data, $res)
35 $this->assertEquals($res,$this->ie->cleanContent($data));