function TextSummaryTestCase::callTextSummary
Calls text_summary() and asserts that the expected teaser is returned.
3 calls to TextSummaryTestCase::callTextSummary()
- TextSummaryTestCase::testFirstSentenceQuestion in modules/
field/ modules/ text/ text.test - Tests an edge case where the first sentence is a question and subsequent sentences are not. This edge case is documented at http://drupal.org/node/180425.
- TextSummaryTestCase::testLength in modules/
field/ modules/ text/ text.test - Test various summary length edge cases.
- TextSummaryTestCase::testLongSentence in modules/
field/ modules/ text/ text.test - Test summary with long example.
File
-
modules/
field/ modules/ text/ text.test, line 396
Class
Code
function callTextSummary($text, $expected, $format = NULL, $size = NULL) {
$summary = text_summary($text, $format, $size);
$this->assertIdentical($summary, $expected, format_string('Generated summary "@summary" matches expected "@expected".', array(
'@summary' => $summary,
'@expected' => $expected,
)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.