You are here

protected function FeedsTamperUnitTestCase::validate in Feeds Tamper 7

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

File

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

Class

FeedsTamperUnitTestCase
Base class for plugin unit tests.

Code

protected 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,
        )));
      }
    }
  }
}