You are here

public function FeedsTamperFindReplaceREGEXTestCase::test in Feeds Tamper 6

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

File

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

Class

FeedsTamperFindReplaceREGEXTestCase
Tests for find_replace_regex.inc

Code

public function test() {
  $settings = array(
    'find' => '/cat/',
    'replace' => 'dog',
    'limit' => '',
  );
  $this
    ->execute('The cat went to the park.', 'The dog went to the park.', $settings);
  $settings['find'] = '/cat/i';
  $this
    ->execute('The Cat went to the park.', 'The dog went to the park.', $settings);
  $settings['find'] = '/cat\\b/i';
  $this
    ->execute('The Catwent to the park.', 'The Catwent to the park.', $settings);
}