You are here

protected function FeedsMapperLinkTestCase::getFormFieldsNames in Feeds 7

Same name and namespace in other branches
  1. 6 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsNames()
  2. 7.2 tests/feeds_mapper_link.test \FeedsMapperLinkTestCase::getFormFieldsNames()

Override parent::getFormFieldsNames().

Overrides FeedsMapperTestCase::getFormFieldsNames

File

tests/feeds_mapper_link.test, line 148

Class

FeedsMapperLinkTestCase
Class for testing Feeds <em>link</em> mapper.

Code

protected function getFormFieldsNames($field_name, $index) {
  if (in_array($field_name, array(
    'alpha',
    'beta',
    'gamma',
    'omega',
  ))) {
    $fields = array(
      "field_{$field_name}[{$index}][url]",
    );
    if (in_array($field_name, array(
      'alpha',
      'gamma',
    ))) {
      $fields[] = "field_{$field_name}[{$index}][title]";
    }
    return $fields;
  }
  else {
    return parent::getFormFieldsNames($field_name, $index);
  }
}