You are here

function NodeTeaserTest::callNodeTeaser in SimpleTest 6

Calls node_teaser() and asserts that the expected teaser is returned.

3 calls to NodeTeaserTest::callNodeTeaser()
NodeTeaserTest::testFirstSentenceQuestion in tests/node_teaser.test
Simpletest test. Tests an edge case where if the first sentence is a question and subsequent sentences are not. This failed in drupal 5. Test and patch for drupal 6 (committed) from http://drupal.org/node/180425
NodeTeaserTest::testFirstSentenceQuestion2 in tests/node_teaser.test
Simpletest test. A real-life example of the above edge case.
NodeTeaserTest::testLength in tests/node_teaser.test
Simpletest test. Runs a test adapted from http://drupal.org/node/180425#comment-634230

File

tests/node_teaser.test, line 148

Class

NodeTeaserTest

Code

function callNodeTeaser($body, $expectedTeaser, $format = NULL, $size = NULL) {
  $teaser = node_teaser($body, $format, $size);
  $this
    ->assertIdentical($teaser, $expectedTeaser);
}