function TextSummaryTest::testFirstSentenceQuestion

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.

File

drupal/core/modules/text/lib/Drupal/text/Tests/TextSummaryTest.php, line 40
Definition of Drupal\text\TextSummaryTest.

Class

TextSummaryTest
Tests the text field summary.

Namespace

Drupal\text\Tests

Code

function testFirstSentenceQuestion() {
  $text = 'A question? A sentence. Another sentence.';
  $expected = 'A question? A sentence.';
  $this
    ->assertTextSummary($text, $expected, NULL, 30);
}