protected function FeedsMapperTestCase::assertNodeFieldValue in Feeds 7.2
Assert that a form field for the given field with the given value exists in the current form.
Parameters
$field_name: The name of the field.
$value: The (raw) value expected for the field.
$index: The index of the field (for q multi-valued field).
See also
FeedsMapperTestCase::getFormFieldsNames()
FeedsMapperTestCase::getFormFieldsValues()
7 calls to FeedsMapperTestCase::assertNodeFieldValue()
- FeedsMapperDateTestCase::test in tests/
feeds_mapper_date.test - Basic test loading a single entry CSV file.
- FeedsMapperFieldTestCase::test in tests/
feeds_mapper_field.test - Basic test loading a double entry CSV file.
- FeedsMapperFieldTestCase::testClearOutValues in tests/
feeds_mapper_field.test - Tests if values are cleared out when an empty value is provided.
- FeedsMapperLinkTestCase::test in tests/
feeds_mapper_link.test - Basic test loading a single entry CSV file.
- FeedsMapperLinkTestCase::testClearOutValues in tests/
feeds_mapper_link.test - Tests if values are cleared out when an empty value or no value is provided.
File
- tests/
feeds_mapper.test, line 54 - Contains FeedsMapperTestCase.
Class
- FeedsMapperTestCase
- Helper class with auxiliary functions for feeds mapper module tests.
Code
protected function assertNodeFieldValue($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,
)));
}
}