summaryrefslogtreecommitdiff
path: root/modules/field/tests/field_test.entity.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/field/tests/field_test.entity.inc')
-rw-r--r--modules/field/tests/field_test.entity.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/field/tests/field_test.entity.inc b/modules/field/tests/field_test.entity.inc
index 3196ebd19..eef3dbf73 100644
--- a/modules/field/tests/field_test.entity.inc
+++ b/modules/field/tests/field_test.entity.inc
@@ -64,6 +64,19 @@ function field_test_entity_info_alter(&$entity_info) {
}
/**
+ * Helper function to enable entity translations.
+ */
+function field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL) {
+ drupal_static_reset('field_has_translation_handler');
+ $stored_value = &drupal_static(__FUNCTION__, array());
+ if (isset($entity_type)) {
+ $stored_value[$entity_type] = $translatable;
+ entity_info_cache_clear();
+ }
+ return $stored_value;
+}
+
+/**
* Creates a new bundle for test_entity entities.
*
* @param $bundle