1 text.test | TextSummaryTestCase::assertTextSummary($text, $expected, $format = NULL, $size = NULL) |
Calls text_summary() and asserts that the expected teaser is returned.
File
- core/
modules/ field/ modules/ text/ tests/ text.test, line 524 - Tests for text.module.
Class
Code
function assertTextSummary($text, $expected, $format = NULL, $size = NULL) {
$summary = text_summary($text, $format, $size);
$this->assertIdentical($summary, $expected, format_string('Generated @format summary "@summary" matches expected "@expected".', array('@format' => $format, '@summary' => str_replace("\n", '\n', $summary), '@expected' => str_replace("\n", '\n', $expected))));
}