DrupalHtmlToTextTestCase::stringToHtml

7 mail.test DrupalHtmlToTextTestCase::stringToHtml($text)
8 mail.test protected DrupalHtmlToTextTestCase::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

modules/simpletest/tests/mail.test, line 107
Test the Drupal mailing system.

Code

function stringToHtml($text) {
  return '"' .
      str_replace(
        array("\n", ' '), 
        array('\n', ' '), 
        check_plain($text)
      ) . '"';
}
Login or register to post comments