' => '', // empty test
'
This is a paragraph with Bold and italics
Also some hrefs and a
few mailto tags.
This is also a really long long line' => '
This is a paragraph with BOLD and _italics_ Also some hrefs [1] and a few
mailto tags. This is also a really long long line
Links:
------
[1] http://www.example.com
'
);
function get_info() {
return array(
'name' => 'HtmlToText Test',
'description' => 'Test htmlToText Function',
'group' => 'CiviCRM BAO Tests',
);
}
function setUp() {
parent::setUp();
}
function testHtmlToText() {
foreach ($this->_testInput as $html => $text) {
$output = CRM_Utils_String::htmlToText($html);
$this->assertEquals(
trim($output),
trim($text),
"Text Output did not match for $html"
);
}
}
}