Mercurial > hg > isophonics-drupal-site
diff core/modules/text/tests/src/Kernel/TextSummaryTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/text/tests/src/Kernel/TextSummaryTest.php Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/text/tests/src/Kernel/TextSummaryTest.php Mon Apr 23 09:46:53 2018 +0100 @@ -208,6 +208,15 @@ } /** + * Test text_summary() returns an empty string without any error when called + * with an invalid format. + */ + public function testInvalidFilterFormat() { + + $this->assertTextSummary($this->randomString(100), '', 'non_existent_format'); + } + + /** * Calls text_summary() and asserts that the expected teaser is returned. */ public function assertTextSummary($text, $expected, $format = NULL, $size = NULL) {