You are here

protected function FeedsMapperMultilingualFieldsTestCase::getFrenchValues in Feeds 7.2

Returns expected and actual values of given node for the French language.

Parameters

object $node: The multilingual node.

string $langcode: The used language code.

Return value

array The expected and actual French values.

8 calls to FeedsMapperMultilingualFieldsTestCase::getFrenchValues()
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.
FeedsMapperMultilingualFieldsTestCase::testClearOutValues in tests/feeds_mapper_multilingual_fields.test
Tests if values are cleared out when an empty value or no value is provided.
FeedsMapperMultilingualFieldsTestCase::testDisabledLanguage in tests/feeds_mapper_multilingual_fields.test
Tests if fields are imported in LANGUAGE_NONE if the field's language gets disabled after configuring.
FeedsMapperMultilingualFieldsTestCase::testMultilingualFieldMappings in tests/feeds_mapper_multilingual_fields.test
Tests multilingual mappings to translatable fields (entity translation).

... See full list

File

tests/feeds_mapper_multilingual_fields.test, line 1008
Contains FeedsMapperMultilingualFieldsTestCase.

Class

FeedsMapperMultilingualFieldsTestCase
Tests field mapping with multiple languages.

Code

protected function getFrenchValues($node, $langcode = 'fr') {
  return array(
    'body' => array(
      'expected' => 'Ceci est la corps',
      'actual' => $node->body[$langcode][0]['value'],
    ),
    'field_date' => array(
      'expected' => '1955-11-05T00:00:00',
      'actual' => $node->field_date[$langcode][0]['value'],
    ),
    'field_datestamp' => array(
      'expected' => '-446731187',
      'actual' => $node->field_datestamp[$langcode][0]['value'],
    ),
    'field_datetime' => array(
      'expected' => '1955-11-05 12:00:13',
      'actual' => $node->field_datetime[$langcode][0]['value'],
    ),
    'field_image' => array(
      'expected' => 'la fayette.jpeg',
      'actual' => $node->field_image[$langcode][0]['filename'],
    ),
    'field_image:alt' => array(
      'expected' => 'La Fayette',
      'actual' => $node->field_image[$langcode][0]['alt'],
    ),
    'field_image:title' => array(
      'expected' => 'la Fayette dans les bois',
      'actual' => $node->field_image[$langcode][0]['title'],
    ),
    'field_link' => array(
      'expected' => 'http://google.fr',
      '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' => 1.2,
      'actual' => $node->field_number_decimal[$langcode][0]['value'],
    ),
    'field_number_float' => array(
      'expected' => 5.6295,
      'actual' => $node->field_number_float[$langcode][0]['value'],
    ),
    'field_number_integer' => array(
      'expected' => 2000,
      'actual' => $node->field_number_integer[$langcode][0]['value'],
    ),
    'field_text' => array(
      'expected' => 'Carottes',
      'actual' => $node->field_text[$langcode][0]['value'],
    ),
  );
}