FieldStorageConfig::
create(['field_name' => 'field_image', 'cardinality' => 1
] +
$field_storage_config)->
save();
FieldStorageConfig::
create(['field_name' => 'field_images', 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED
] +
$field_storage_config)->
save();
$field_config =
[ 'entity_type' => 'node',
'bundle' => 'referencer',
];
FieldConfig::
create(['field_name' => 'field_image', 'label' => 'Image'
] +
$field_config)->
save();
FieldConfig::
create(['field_name' => 'field_images', 'label' => 'Images'
] +
$field_config)->
save();
// Set up the test data.
$this->
setUpCurrentUser([],
['access content'
]);
$this->user1 = User::
create([ 'name' =>
$this->
randomMachineName(),
'mail' =>
$this->
randomMachineName() . '@example.com',
'uuid' =>
static::
$userIds[0
],
'uid' =>
static::
$userUids[0
],
]);
$this->user1->
save();
$this->user2 = User::
create([ 'name' =>
$this->
randomMachineName(),
'mail' =>
$this->
randomMachineName() . '@example.com',
'uuid' =>
static::
$userIds[1
],