You are here

public function Feedsi18nNodeTestCase::testDisabledLocaleModule in Feeds 7.2

Tests if nodes get imported in LANGUAGE_NONE when the locale module gets disabled.

File

tests/feeds_i18n_node.test, line 105
Contains Feedsi18nNodeTestCase.

Class

Feedsi18nNodeTestCase
Tests importing nodes in a language.

Code

public function testDisabledLocaleModule() {
  module_disable(array(
    'locale',
  ));

  // 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 content has no language assigned.
  for ($i = 1; $i <= 2; $i++) {
    $node = node_load($i);
    $language = entity_language('node', $node);
    $this
      ->assertEqual(LANGUAGE_NONE, $language, format_string('The node is language neutral (actual: !language).', array(
      '!language' => $language,
    )));
  }
}