You are here

public function Feedsi18nTaxonomyTestCase::testUninstalledi18nTaxonomyModule in Feeds 7.2

Tests if terms get imported in LANGUAGE_NONE when the i18n_taxonomy module gets uninstalled.

File

tests/feeds_i18n_taxonomy.test, line 109
Contains Feedsi18nTaxonomyTestCase.

Class

Feedsi18nTaxonomyTestCase
Tests importing terms in a language.

Code

public function testUninstalledi18nTaxonomyModule() {
  module_disable(array(
    'i18n_taxonomy',
  ));
  drupal_uninstall_modules(array(
    'i18n_taxonomy',
  ));

  // Make sure that entity info is reset.
  drupal_flush_all_caches();
  drupal_static_reset();

  // Import content.
  $this
    ->importFile('i18n', $this
    ->absolutePath() . '/tests/feeds/content.csv');

  // Assert that the terms have no language assigned.
  $entities = entity_load($this->entityType, array(
    1,
    2,
  ));
  foreach ($entities as $entity) {
    $this
      ->assertFalse(isset($entity->language), 'The term does not have a language.');
  }
}