public function Feedsi18nTestCase::testDisabledLanguage in Feeds 7.2
Tests if items are imported in LANGUAGE_NONE if the processor's language is disabled.
File
- tests/
feeds_i18n.test, line 99 - Contains Feedsi18nTestCase.
Class
- Feedsi18nTestCase
- Tests importing data in a language.
Code
public function testDisabledLanguage() {
// Disable the German language.
$path = 'admin/config/regional/language';
$edit = array(
'enabled[de]' => FALSE,
);
$this
->drupalPost($path, $edit, t('Save configuration'));
// Import content.
$this
->importFile('i18n', $this
->absolutePath() . '/tests/feeds/content.csv');
// Assert that the entities have no language assigned.
$entities = entity_load($this->entityType, array(
1,
2,
));
foreach ($entities as $entity) {
$language = entity_language($this->entityType, $entity);
$this
->assertEqual(LANGUAGE_NONE, $language, format_string('The entity is language neutral (actual: !language).', array(
'!language' => $language,
)));
}
}