Set the default field storage backend for fields created during tests.
Overrides FieldUnitTestBase::setUp
public function setUp() {
parent::setUp();
$this
->installSchema('file', 'file_managed');
$this
->installSchema('file', 'file_usage');
$field = array(
'field_name' => 'file_test',
'type' => 'file',
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
);
field_create_field($field);
$instance = array(
'entity_type' => 'entity_test',
'field_name' => 'file_test',
'bundle' => 'entity_test',
);
field_create_instance($instance);
file_put_contents('public://example.txt', $this
->randomName());
$this->file = entity_create('file', array(
'uri' => 'public://example.txt',
));
$this->file
->save();
}