Drupal 8  8.0.2
EntityReferenceItemTest Class Reference
Inheritance diagram for EntityReferenceItemTest:

Public Member Functions

 testContentEntityReferenceItem ()
 
 testContentEntityReferenceItemWithStringId ()
 
 testConfigEntityReferenceItem ()
 
 testEntityAutoCreate ()
 
 testEntitySaveOrder ()
 
 testSelectionHandlerSettings ()
 
 testAutocreateValidation ()
 

Static Public Attributes

static $modules = ['node', 'comment', 'file', 'taxonomy', 'text', 'filter', 'views', 'field']
 
- Static Public Attributes inherited from FieldUnitTestBase
static $modules = ['user', 'system', 'field', 'text', 'entity_test', 'field_test']
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from FieldUnitTestBase
 setUp ()
 
 createFieldWithStorage ($suffix= '', $entity_type= 'entity_test', $bundle=NULL)
 
 entitySaveReload (EntityInterface $entity)
 
 entityValidateAndSave (EntityInterface $entity)
 
 _generateTestFieldValues ($cardinality)
 
 assertFieldValues (EntityInterface $entity, $field_name, $expected_values, $langcode=LanguageInterface::LANGCODE_NOT_SPECIFIED, $column= 'value')
 

Protected Attributes

 $vocabulary
 
 $term
 
 $entityStringId
 
- Protected Attributes inherited from FieldUnitTestBase
 $fieldTestData
 

Detailed Description

Tests the new entity API for the entity reference field type.

entity_reference

Member Function Documentation

setUp ( )
protected

Sets up the test.

References Entity\create(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Unicode\strtolower().

Here is the call graph for this function:

testAutocreateValidation ( )

Tests ValidReferenceConstraint with newly created and unsaved entities.

References Entity\create(), and LanguageInterface\LANGCODE_NOT_SPECIFIED.

Here is the call graph for this function:

testConfigEntityReferenceItem ( )

Tests the entity reference field type for referencing config entities.

References LanguageInterface\LANGCODE_NOT_SPECIFIED, Entity\load(), and Unicode\strtolower().

Here is the call graph for this function:

testContentEntityReferenceItem ( )

Tests the entity reference field type for referencing content entities.

References FieldUnitTestBase\entityValidateAndSave(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Entity\load().

Here is the call graph for this function:

testContentEntityReferenceItemWithStringId ( )

Tests referencing content entities with string IDs.

References Entity\create(), and Drupal\entityManager().

Here is the call graph for this function:

testEntityAutoCreate ( )

Tests entity auto create.

References Entity\create(), Drupal\entityManager(), and LanguageInterface\LANGCODE_NOT_SPECIFIED.

Here is the call graph for this function:

testEntitySaveOrder ( )

Test saving order sequence doesn't matter.

References LanguageInterface\LANGCODE_NOT_SPECIFIED.

testSelectionHandlerSettings ( )

Tests that the 'handler' field setting stores the proper plugin ID.

References Entity\create(), Entity\load(), and Unicode\strtolower().

Here is the call graph for this function:


The documentation for this class was generated from the following file: