1 mail.test | BackdropHtmlToTextTestCase::stringToHtml($text) |
Converts a string to its PHP source equivalent for display in test messages.
Parameters
$text: The text string to convert.
Return value
An HTML representation of the text string that, when displayed in a: browser, represents the PHP source code equivalent of $text.
File
- core/
modules/ simpletest/ tests/ mail.test, line 90 - Test the Backdrop mailing system.
Class
- BackdropHtmlToTextTestCase
- Unit tests for backdrop_html_to_text().
Code
function stringToHtml($text) {
return '"' .
str_replace(
array("\n", ' '),
array('\n', ' '),
check_plain($text)
) . '"';
}