Loading modules/field/modules/text/text.module +5 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,11 @@ function _text_sanitize($instance, $langcode, $item, $column) { */ function text_summary($text, $format = NULL, $size = NULL) { // If the input text is NULL, return unchanged. if (is_null($text)) { return NULL; } if (!isset($size)) { // What used to be called 'teaser' is now called 'summary', but // the variable 'teaser_length' is preserved for backwards compatibility. Loading modules/field/modules/text/text.test +8 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,14 @@ class TextSummaryTestCase extends DrupalWebTestCase { } } /** * Test for the NULL value. */ function testNullSentence() { $summary = text_summary(NULL); $this->assertNull($summary, 'text_summary() casts returned null'); } /** * Calls text_summary() and asserts that the expected teaser is returned. */ Loading Loading
modules/field/modules/text/text.module +5 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,11 @@ function _text_sanitize($instance, $langcode, $item, $column) { */ function text_summary($text, $format = NULL, $size = NULL) { // If the input text is NULL, return unchanged. if (is_null($text)) { return NULL; } if (!isset($size)) { // What used to be called 'teaser' is now called 'summary', but // the variable 'teaser_length' is preserved for backwards compatibility. Loading
modules/field/modules/text/text.test +8 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,14 @@ class TextSummaryTestCase extends DrupalWebTestCase { } } /** * Test for the NULL value. */ function testNullSentence() { $summary = text_summary(NULL); $this->assertNull($summary, 'text_summary() casts returned null'); } /** * Calls text_summary() and asserts that the expected teaser is returned. */ Loading