protected function FeedsMapperMultilingualFieldsTestCase::getDutchValues in Feeds 7.2
Returns expected and actual values of given node for the Dutch language.
Parameters
object $node: The multilingual node.
string $langcode: The used language code.
Return value
array The expected and actual Dutch values.
2 calls to FeedsMapperMultilingualFieldsTestCase::getDutchValues()
- FeedsMapperMultilingualFieldsTestCase::testChangedLanguageImport in tests/
feeds_mapper_multilingual_fields.test - Tests if values of fields in other languages are kept when not importing in that language.
- FeedsMapperMultilingualFieldsTestCase::testChangedLanguageImportForExistingNode in tests/
feeds_mapper_multilingual_fields.test - Tests if values of fields in other languages are kept when not importing in that language for nodes that were not created by Feeds.
File
- tests/
feeds_mapper_multilingual_fields.test, line 872 - Contains FeedsMapperMultilingualFieldsTestCase.
Class
- FeedsMapperMultilingualFieldsTestCase
- Tests field mapping with multiple languages.
Code
protected function getDutchValues($node, $langcode = 'nl') {
return array(
'body' => array(
'expected' => 'Dit is de berichttekst',
'actual' => $node->body[$langcode][0]['value'],
),
'field_date' => array(
'expected' => '1985-07-29T00:00:00',
'actual' => $node->field_date[$langcode][0]['value'],
),
'field_datestamp' => array(
'expected' => '491460492',
'actual' => $node->field_datestamp[$langcode][0]['value'],
),
'field_datetime' => array(
'expected' => '1985-07-29 04:48:12',
'actual' => $node->field_datetime[$langcode][0]['value'],
),
'field_image' => array(
'expected' => 'attersee.jpeg',
'actual' => $node->field_image[$langcode][0]['filename'],
),
'field_image:alt' => array(
'expected' => 'Bij het zien',
'actual' => $node->field_image[$langcode][0]['alt'],
),
'field_image:title' => array(
'expected' => 'Bij het zien van de groene vloeistof',
'actual' => $node->field_image[$langcode][0]['title'],
),
'field_link' => array(
'expected' => 'http://google.nl',
'actual' => $node->field_link[$langcode][0]['url'],
),
'field_list_boolean' => array(
'expected' => '1',
'actual' => $node->field_list_boolean[$langcode][0]['value'],
),
'field_number_decimal' => array(
'expected' => 30.3,
'actual' => $node->field_number_decimal[$langcode][0]['value'],
),
'field_number_float' => array(
'expected' => 30.2795,
'actual' => $node->field_number_float[$langcode][0]['value'],
),
'field_number_integer' => array(
'expected' => 30,
'actual' => $node->field_number_integer[$langcode][0]['value'],
),
'field_text' => array(
'expected' => 'Wortelen',
'actual' => $node->field_text[$langcode][0]['value'],
),
);
}