Set the default field storage backend for fields created during tests.
Overrides FieldUnitTestBase::setUp
public function setUp() {
parent::setUp();
$this
->installSchema('file', array(
'file_managed',
'file_usage',
));
$field = array(
'field_name' => 'image_test',
'type' => 'image',
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
);
field_create_field($field);
$instance = array(
'entity_type' => 'entity_test',
'field_name' => 'image_test',
'bundle' => 'entity_test',
);
field_create_instance($instance);
file_unmanaged_copy(DRUPAL_ROOT . '/core/misc/druplicon.png', 'public://example.jpg');
$this->image = entity_create('file', array(
'uri' => 'public://example.jpg',
));
$this->image
->save();
}