Calls text_summary() and asserts that the expected teaser is returned.
function assertTextSummary($text, $expected, $format = NULL, $size = NULL) {
$summary = text_summary($text, $format, $size);
$this
->assertIdentical($summary, $expected, format_string('<pre style="white-space: pre-wrap">@actual</pre> is identical to <pre style="white-space: pre-wrap">@expected</pre>', array(
'@actual' => $summary,
'@expected' => $expected,
)));
}