You are here

public function TextSummaryTest::testInvalidFilterFormat in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/text/tests/src/Kernel/TextSummaryTest.php \Drupal\Tests\text\Kernel\TextSummaryTest::testInvalidFilterFormat()
  2. 10 core/modules/text/tests/src/Kernel/TextSummaryTest.php \Drupal\Tests\text\Kernel\TextSummaryTest::testInvalidFilterFormat()

Tests text_summary() returns an empty string without any error when called with an invalid format.

File

core/modules/text/tests/src/Kernel/TextSummaryTest.php, line 232

Class

TextSummaryTest
Tests text_summary() with different strings and lengths.

Namespace

Drupal\Tests\text\Kernel

Code

public function testInvalidFilterFormat() {
  $this
    ->assertTextSummary($this
    ->randomString(100), '', 'non_existent_format');
}