You are here

public function FeedsTamperUnitTestCase::validate in Feeds Tamper 6

Same name and namespace in other branches
  1. 7 tests/feeds_tamper_plugins.test \FeedsTamperUnitTestCase::validate()
2 calls to FeedsTamperUnitTestCase::validate()
FeedsTamperKeyWordFilterTestCase::executeKey in tests/feeds_tamper_plugins.test
FeedsTamperUnitTestCase::execute in tests/feeds_tamper_plugins.test

File

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

Class

FeedsTamperUnitTestCase
Base class for plugin unit tests.

Code

public function validate(&$settings = array()) {
  if (!empty($this->plugin_info['validate'])) {
    $this->plugin_info['validate']($settings);
    if ($errors = form_get_errors()) {
      foreach ($errors as $key => $value) {
        $this
          ->error(t('Input error on %key with value %value.', array(
          '%key' => $key,
          '%value' => $value,
        )));
      }
    }
  }
}