Commit efd9012f authored by catch's avatar catch

Issue #1277776 by sun: test cleanup for generic field/property getters/setters...

Issue #1277776 by sun: test cleanup for generic field/property getters/setters (with optional language support) for entities.
parent 93c20fd0
......@@ -103,10 +103,9 @@ class EntityTranslationTestCase extends DrupalWebTestCase {
}
function setUp() {
// Enable translations for the test entity type. We cannot use
// variable_set() here as variables are cleared by parent::setUp();
$GLOBALS['entity_test_translation'] = TRUE;
parent::setUp('entity_test', 'language', 'locale');
// Enable translations for the test entity type.
variable_set('entity_test_translation', TRUE);
// Create a translatable test field.
$this->field_name = drupal_strtolower($this->randomName() . '_field_name');
......
......@@ -20,7 +20,7 @@ function entity_test_entity_info() {
),
);
// Optionally specify a translation handler for testing translations.
if (!empty($GLOBALS['entity_test_translation'])) {
if (variable_get('entity_test_translation')) {
$items['entity_test']['translation']['entity_test'] = TRUE;
}
return $items;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment