'test_setting' => 999)));
field_create_instance($instance);
+ $info = entity_get_info('test_entity');
$instances = field_info_instances('test_entity', $instance['bundle']);
- $this->assertEqual(count($instances), 1, t('One instance shows up in info when attached to a bundle.'));
+ $this->assertEqual(count($instances), 1, format_string('One instance shows up in info when attached to a bundle on a @label.', array(
+ '@label' => $info['label']
+ )));
$this->assertTrue($instance < $instances[$instance['field_name']], t('Instance appears in info correctly'));
// Test a valid entity type but an invalid bundle.
return array(
'test_entity' => array(
- 'name' => t('Test Entity'),
+ 'label' => t('Test Entity'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
),
// This entity type doesn't get form handling for now...
'test_cacheable_entity' => array(
- 'name' => t('Test Entity, cacheable'),
+ 'label' => t('Test Entity, cacheable'),
'fieldable' => TRUE,
'field cache' => TRUE,
'entity keys' => array(
'view modes' => $test_entity_modes,
),
'test_entity_bundle_key' => array(
- 'name' => t('Test Entity with a bundle key.'),
+ 'label' => t('Test Entity with a bundle key.'),
'base table' => 'test_entity_bundle_key',
'fieldable' => TRUE,
'field cache' => FALSE,
),
// In this case, the bundle key is not stored in the database.
'test_entity_bundle' => array(
- 'name' => t('Test Entity with a specified bundle.'),
+ 'label' => t('Test Entity with a specified bundle.'),
'base table' => 'test_entity_bundle',
'fieldable' => TRUE,
'controller class' => 'TestEntityBundleController',
),
// @see EntityPropertiesTestCase::testEntityLabel()
'test_entity_no_label' => array(
- 'name' => t('Test entity without label'),
+ 'label' => t('Test entity without label'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'view modes' => $test_entity_modes,
),
'test_entity_label' => array(
- 'name' => t('Test entity label'),
+ 'label' => t('Test entity label'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',
'view modes' => $test_entity_modes,
),
'test_entity_label_callback' => array(
- 'name' => t('Test entity label callback'),
+ 'label' => t('Test entity label callback'),
'fieldable' => TRUE,
'field cache' => FALSE,
'base table' => 'test_entity',