protected function EntityTranslationToggleFieldsTranslatabilityTestCase::createUntranslatedTag in Entity Translation 7
Create a "Tags" term in the specified language.
Parameters
$name: Name of the term.
$description: Description of the term.
$text: Content for the field_simple_text field.
1 call to EntityTranslationToggleFieldsTranslatabilityTestCase::createUntranslatedTag()
- EntityTranslationToggleFieldsTranslatabilityTestCase::testTogglingFieldsWithDataNonRevisionable in tests/
entity_translation.test - Tests toggling translatability on fields with data (non-revisionable).
File
- tests/
entity_translation.test, line 1058 - Tests for Entity translation module.
Class
- EntityTranslationToggleFieldsTranslatabilityTestCase
- Tests for enabling fields to use Entity Translation or disabling them.
Code
protected function createUntranslatedTag($name, $description, $text) {
$edit = array(
'name' => $name,
'description[value]' => $description,
"field_simple_text[und][0][value]" => $text,
);
$this
->drupalPost('admin/structure/taxonomy/tags/add', $edit, t('Save'));
// Check to make sure the term was created.
$term = current(entity_load('taxonomy_term', FALSE, array(
'name' => $name,
), TRUE));
$this
->assertTrue($term, t('Term found in database.'));
return $term;
}