public function Feedsi18nTestCase::testImport in Feeds 7.2
Tests if entities get the language assigned that is set in the processor.
File
- tests/
feeds_i18n.test, line 64 - Contains Feedsi18nTestCase.
Class
- Feedsi18nTestCase
- Tests importing data in a language.
Code
public function testImport() {
// Import content in German.
$this
->importFile('i18n', $this
->absolutePath() . '/tests/feeds/content.csv');
// Assert that the entity's language is in German.
$entities = entity_load($this->entityType, array(
1,
2,
));
foreach ($entities as $entity) {
$this
->assertEqual('de', entity_language($this->entityType, $entity));
}
}