does not support FieldDefinitionInterface::CARDINALITY_UNLIMITED
Many tests lose their sense.
diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module
index e44cc32..ca89b07 100644
--- a/core/modules/entity_reference/entity_reference.module
+++ b/core/modules/entity_reference/entity_reference.module
@@ -210,6 +210,7 @@ function entity_reference_create_instance($entity_type, $bundle, $field_name, $f
'name' => $field_name,
'type' => 'entity_reference',
'entity_type' => $entity_type,
+ 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED,
'settings' => array(
'target_type' => $target_entity_type,
),
Comments
Comment #1
swentel commentedComment #2
swentel commentedComment #3
aspilicious commentedTests needed?
Comment #4
amateescu commented'int' ;)
This looks straightforward enough and it's just a helper function after all..
Comment #5
Anonymous (not verified) commentedI also think that it does not require test. This function is used for tests only.
Comment #6
amateescu commentedHere we go, I needed this in a patch yesterday.
Comment #7
alexpottCommitted 1b252e2 and pushed to 8.x. Thanks!