You are here

public function FeedsTamperTruncateTextTestCase::test in Feeds Tamper 7

Same name and namespace in other branches
  1. 6 tests/feeds_tamper_plugins.test \FeedsTamperTruncateTextTestCase::test()

File

tests/feeds_tamper_plugins.test, line 1080
Unit tests for feeds tamper plugins.

Class

FeedsTamperTruncateTextTestCase
Tests for truncate_text.inc

Code

public function test() {
  $this
    ->execute('Hello, how are you today?', 'Hello', array(
    'num_char' => 5,
    'ellipses' => FALSE,
  ));
  $this
    ->execute('Hello, how are you today?', 'He...', array(
    'num_char' => 5,
    'ellipses' => TRUE,
  ));
  $this
    ->execute('Hello', 'Hello', array(
    'num_char' => 5,
    'ellipses' => TRUE,
  ));
  $this
    ->execute('Hello, how are you today?', 'Hello, how', array(
    'num_char' => 12,
    'ellipses' => FALSE,
    'wordsafe' => TRUE,
  ));
}