You are here

protected function FeedsMapperTestCase::assertCCKFieldValue in Feeds 6

Same name and namespace in other branches
  1. 7 tests/feeds_mapper_test.inc \FeedsMapperTestCase::assertCCKFieldValue()

Assert that a form field for the given CCK field with the given value exists in the current form.

Parameters

$field_name: The name of the CCK field.

$value: The (raw) value expected for the CCK field.

$index: The index of the field (for q multi-valued field).

See also

FeedsMapperTestCase::getFormFieldsNames()

FeedsMapperTestCase::getFormFieldsValues()

5 calls to FeedsMapperTestCase::assertCCKFieldValue()
FeedsMapperContentTaxonomyTestCase::test in tests/feeds_mapper_content_taxonomy.test
Basic test loading a single entry CSV file.
FeedsMapperContentTestCase::test in tests/feeds_mapper_content.test
Basic test loading a doulbe entry CSV file.
FeedsMapperDateTestCase::test in tests/feeds_mapper_date.test
Basic test loading a single entry CSV file.
FeedsMapperEmailTestCase::test in tests/feeds_mapper_email.test
Basic test loading a doulbe entry CSV file.
FeedsMapperLinkTestCase::test in tests/feeds_mapper_link.test
Basic test loading a single entry CSV file.

File

tests/feeds_mapper.test, line 47
Helper class with auxiliary functions for feeds mapper module tests.

Class

FeedsMapperTestCase
Base class for implementing Feeds Mapper test cases.

Code

protected function assertCCKFieldValue($field_name, $value, $index = 0) {
  $names = $this
    ->getFormFieldsNames($field_name, $index);
  $values = $this
    ->getFormFieldsValues($field_name, $value);
  foreach ($names as $k => $name) {
    $value = $values[$k];
    $this
      ->assertFieldByName($name, $value, t('Found form field %name for %field_name with the expected value.', array(
      '%name' => $name,
      '%field_name' => $field_name,
    )));
  }
}