function EntityTranslationTranslationTestCase::testDisabledLanguages in Entity Translation 7
Test disabled languages.
Make sure disabled languages are not accessible in the language list when the option entity_translation_languages_enabled is enabled.
File
- tests/
entity_translation.test, line 314 - Tests for Entity translation module.
Class
- EntityTranslationTranslationTestCase
- Basic tests for the translation creation/editing workflow.
Code
function testDisabledLanguages() {
$this
->drupalGet('node/add/page');
$this
->assertRaw('value="fr"', 'French is available even if the language is disabled');
variable_set('entity_translation_languages_enabled', TRUE);
$this
->drupalGet('node/add/page');
$this
->assertNoRaw('value="fr"', 'French is not available when the language is disabled and the option entity_translation_languages_enabled is enabled.');
}