diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 04:37:03 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 04:37:03 +0000 |
commit | 52f99dc071428a1490d0d367e95706a65f5b3d17 (patch) | |
tree | 1849fb9cf3ad6237ba6735aff09ac1665bd8dc96 /modules/field/tests | |
parent | ac581679b00ec8baa4f9a94ad90af050de870efd (diff) | |
download | brdo-52f99dc071428a1490d0d367e95706a65f5b3d17.tar.gz brdo-52f99dc071428a1490d0d367e95706a65f5b3d17.tar.bz2 |
#645926 by Damien Tournoud and yched: hook_field_storage_details() should be per-field, not per-instance. Allows Views/Field integration to get unblocked.
Diffstat (limited to 'modules/field/tests')
-rw-r--r-- | modules/field/tests/field.test | 4 | ||||
-rw-r--r-- | modules/field/tests/field_test.storage.inc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/field/tests/field.test b/modules/field/tests/field.test index f4ba5a8cc..b207bb55e 100644 --- a/modules/field/tests/field.test +++ b/modules/field/tests/field.test @@ -328,9 +328,9 @@ class FieldAttachStorageTestCase extends FieldAttachTestCase { $instance = field_info_instance($instance['object_type'], $instance['field_name'], $instance['bundle']); // The storage details are indexed by a storage engine type. - $this->assertTrue(array_key_exists('drupal_variables', $instance['storage_details']), t('The storage type is Drupal variables.')); + $this->assertTrue(array_key_exists('drupal_variables', $field['storage']['details']), t('The storage type is Drupal variables.')); - $details = $instance['storage_details']['drupal_variables']; + $details = $field['storage']['details']['drupal_variables']; // The field_test storage details are indexed by variable name. The details // are altered, so moon and mars are correct for this test. diff --git a/modules/field/tests/field_test.storage.inc b/modules/field/tests/field_test.storage.inc index dd9e2eb89..e85c832cf 100644 --- a/modules/field/tests/field_test.storage.inc +++ b/modules/field/tests/field_test.storage.inc @@ -26,7 +26,7 @@ function field_test_field_storage_info() { /** * Implements hook_field_storage_details(). */ -function field_test_field_storage_details($field, $instance) { +function field_test_field_storage_details($field) { $details = array(); // Add field columns. @@ -47,7 +47,7 @@ function field_test_field_storage_details($field, $instance) { * * @see FieldAttachStorageTestCase::testFieldStorageDetailsAlter() */ -function field_test_field_storage_details_alter(&$details, $field, $instance) { +function field_test_field_storage_details_alter(&$details, $field) { // For testing, storage details are changed only because of the field name. if ($field['field_name'] == 'field_test_change_my_details') { |