You are here

protected function FeedsMapperMultilingualFieldsTestCase::addLanguage in Feeds 7.2

Adds a language to test with.

Parameters

string $langcode: The language's langcode.

string $label: The language human readable name.

3 calls to FeedsMapperMultilingualFieldsTestCase::addLanguage()
FeedsMapperMultilingualFieldsTestCase::setUp in tests/feeds_mapper_multilingual_fields.test
Sets up a Drupal site for running functional and integration tests.
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 747
Contains FeedsMapperMultilingualFieldsTestCase.

Class

FeedsMapperMultilingualFieldsTestCase
Tests field mapping with multiple languages.

Code

protected function addLanguage($langcode, $label) {
  $edit = array(
    'langcode' => $langcode,
  );
  $this
    ->drupalPost('admin/config/regional/language/add', $edit, t('Add language'));
  $this
    ->assertText(format_string('The language @language has been created and can now be used.', array(
    '@language' => $label,
  )));
}