contrib modules security updates
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Helper class with auxiliary functions for feeds mapper module tests.
|
||||
* Contains FeedsMapperTestCase.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base class for implementing Feeds Mapper test cases.
|
||||
* Helper class with auxiliary functions for feeds mapper module tests.
|
||||
*/
|
||||
class FeedsMapperTestCase extends FeedsWebTestCase {
|
||||
|
||||
@@ -19,13 +19,19 @@ class FeedsMapperTestCase extends FeedsWebTestCase {
|
||||
'email' => 'email_textfield',
|
||||
'emimage' => 'emimage_textfields',
|
||||
'emaudio' => 'emaudio_textfields',
|
||||
'filefield' => 'filefield_widget',
|
||||
'image' => 'imagefield_widget',
|
||||
'file' => 'file_generic',
|
||||
'image' => 'image_image',
|
||||
'link_field' => 'link_field',
|
||||
'list_boolean' => 'options_onoff',
|
||||
'list_float' => 'options_select',
|
||||
'list_integer' => 'options_select',
|
||||
'list_text' => 'options_select',
|
||||
'number_float' => 'number',
|
||||
'number_integer' => 'number',
|
||||
'nodereference' => 'nodereference_select',
|
||||
'text' => 'text_textfield',
|
||||
'text_long' => 'text_textarea',
|
||||
'text_with_summary' => 'text_textarea_with_summary',
|
||||
'userreference' => 'userreference_select',
|
||||
);
|
||||
|
||||
@@ -52,6 +58,29 @@ class FeedsMapperTestCase extends FeedsWebTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that a form field for the given field with the given value
|
||||
* does not exist in the current form.
|
||||
*
|
||||
* @param $field_name
|
||||
* The name of the field.
|
||||
* @param $value
|
||||
* The (raw) value of the field.
|
||||
* @param $index
|
||||
* The index of the field (for q multi-valued field).
|
||||
*
|
||||
* @see FeedsMapperTestCase::getFormFieldsNames()
|
||||
* @see FeedsMapperTestCase::getFormFieldsValues()
|
||||
*/
|
||||
protected function assertNoNodeFieldValue($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->assertNoFieldByName($name, $value, t('Did not find form field %name for %field_name with the value %value.', array('%name' => $name, '%field_name' => $field_name, '%value' => $value)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the form fields names for a given CCK field. Default implementation
|
||||
* provides support for a single form field with the following name pattern
|
||||
@@ -157,4 +186,5 @@ class FeedsMapperTestCase extends FeedsWebTestCase {
|
||||
$field_widgets = FeedsMapperTestCase::$field_widgets;
|
||||
return isset($field_widgets[$field_type]) ? $field_widgets[$field_type] : NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user