You are here

public function Feedsi18nTaxonomyTestCase::testDisabledi18nTaxonomyModule in Feeds 7.2

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

File

tests/feeds_i18n_taxonomy.test, line 89
Contains Feedsi18nTaxonomyTestCase.

Class

Feedsi18nTaxonomyTestCase
Tests importing terms in a language.

Code

public function testDisabledi18nTaxonomyModule() {
  module_disable(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) {

    // Terms shouldn't have a language property.
    $this
      ->assertFalse(isset($entity->language), 'The term does not have a language.');
  }
}