public function Feedsi18nNodeTestCase::testUninstalledLocaleModule in Feeds 7.2
Tests if nodes get imported in LANGUAGE_NONE when the locale module gets uninstalled.
File
- tests/
feeds_i18n_node.test, line 125 - Contains Feedsi18nNodeTestCase.
Class
- Feedsi18nNodeTestCase
- Tests importing nodes in a language.
Code
public function testUninstalledLocaleModule() {
module_disable(array(
'locale',
));
drupal_uninstall_modules(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,
)));
}
}