You are here

public function FeedsTamperRequiredTestCase::test in Feeds Tamper 7

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

File

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

Class

FeedsTamperRequiredTestCase
Tests for required.inc

Code

public function test() {
  $input = array();
  $input[] = array(
    's1' => 'sdafasf',
    's2' => 'asdfsf',
    's3' => 'asdfasf',
  );
  $input[] = array(
    's1' => 'sdafasf',
    's2' => 'asdfsf',
    's3' => NULL,
  );
  $input[] = array(
    's1' => 'sdafasf',
    's2' => 'asdfsf',
    's3' => 'asdfasf',
  );
  $output = $input;
  unset($output[1]);
  $this
    ->executeReq($input, $output, 's3');

  // Test inverted.
  $output = $input;
  unset($output[0], $output[2]);
  $this
    ->executeReq($input, $output, 's3', array(
    'invert' => TRUE,
  ));
}