Skip to content
Snippets Groups Projects
Commit efd9012f authored by catch's avatar catch
Browse files

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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment