Drupal 8  8.0.2
EntityFieldManagerTest Class Reference
Inheritance diagram for EntityFieldManagerTest:

Public Member Functions

 testGetBaseFieldDefinitions ()
 
 testGetFieldDefinitions ()
 
 testGetFieldStorageDefinitions ()
 
 testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode ($default_langcode_key)
 
 providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode ()
 
 testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode ($provide_key, $provide_field, $translatable)
 
 providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode ()
 
 testGetBaseFieldDefinitionsWithCaching ()
 
 testGetFieldDefinitionsWithCaching ()
 
 testGetFieldStorageDefinitionsWithCaching ()
 
 testGetBaseFieldDefinitionsInvalidDefinition ()
 
 testGetFieldDefinitionsProvider ()
 
 testClearCachedFieldDefinitions ()
 
 testGetExtraFields ()
 
 testGetFieldMap ()
 
 testGetFieldMapFromCache ()
 
 testGetFieldMapByFieldType ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setUpEntityTypeDefinitions ($definitions=[])
 
 setUpEntityWithFieldDefinition ($custom_invoke_all=FALSE, $field_definition_id= 'id', $entity_keys=[])
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $typedDataManager
 
 $moduleHandler
 
 $cacheBackend
 
 $cacheTagsInvalidator
 
 $languageManager
 
 $keyValueFactory
 
 $eventDispatcher
 
 $entityTypeManager
 
 $entityTypeRepository
 
 $entityTypeBundleInfo
 
 $entityDisplayRepository
 
 $entityFieldManager
 
 $container
 
 $entityType
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Entity

Member Function Documentation

providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode ( )

Provides test data for testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode().

Returns
array Test data.
providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode ( )

Provides test data for testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode().

Returns
array Test data.
setUp ( )
protected

{}

References Drupal\entityTypeManager(), Drupal\languageManager(), Drupal\moduleHandler(), Drupal\setContainer(), and Drupal\typedDataManager().

Here is the call graph for this function:

setUpEntityTypeDefinitions (   $definitions = [])
protected

Sets up the entity type manager to be tested.

Parameters
\Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[]$definitions (optional) An array of entity type definitions.

References Drupal\entityTypeManager().

Referenced by EntityFieldManagerTest\setUpEntityWithFieldDefinition(), EntityFieldManagerTest\testClearCachedFieldDefinitions(), EntityFieldManagerTest\testGetExtraFields(), EntityFieldManagerTest\testGetFieldMap(), EntityFieldManagerTest\testGetFieldMapByFieldType(), and EntityFieldManagerTest\testGetFieldMapFromCache().

Here is the call graph for this function:

Here is the caller graph for this function:

setUpEntityWithFieldDefinition (   $custom_invoke_all = FALSE,
  $field_definition_id = 'id',
  $entity_keys = [] 
)
protected

Prepares an entity that defines a field definition.

Parameters
bool$custom_invoke_all(optional) Whether the test will set up its own ModuleHandlerInterface::invokeAll() implementation. Defaults to FALSE.
string$field_definition_id(optional) The ID to use for the field definition. Defaults to 'id'.
array$entity_keys(optional) An array of entity keys for the mocked entity type. Defaults to an empty array.
Returns
| A field definition object.

References Drupal\entityTypeManager(), Drupal\moduleHandler(), and EntityFieldManagerTest\setUpEntityTypeDefinitions().

Referenced by EntityFieldManagerTest\testGetBaseFieldDefinitions(), EntityFieldManagerTest\testGetBaseFieldDefinitionsInvalidDefinition(), EntityFieldManagerTest\testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode(), EntityFieldManagerTest\testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode(), EntityFieldManagerTest\testGetBaseFieldDefinitionsWithCaching(), EntityFieldManagerTest\testGetFieldDefinitions(), EntityFieldManagerTest\testGetFieldDefinitionsProvider(), EntityFieldManagerTest\testGetFieldDefinitionsWithCaching(), EntityFieldManagerTest\testGetFieldStorageDefinitions(), and EntityFieldManagerTest\testGetFieldStorageDefinitionsWithCaching().

Here is the call graph for this function:

Here is the caller graph for this function:

testClearCachedFieldDefinitions ( )

Tests the clearCachedFieldDefinitions() method.

::clearCachedFieldDefinitions

References EntityFieldManagerTest\setUpEntityTypeDefinitions(), and Drupal\typedDataManager().

Here is the call graph for this function:

testGetBaseFieldDefinitions ( )

Tests the getBaseFieldDefinitions() method.

::getBaseFieldDefinitions ::buildBaseFieldDefinitions

References EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetBaseFieldDefinitionsInvalidDefinition ( )

Tests the getBaseFieldDefinitions() method with an invalid definition.

::getBaseFieldDefinitions ::buildBaseFieldDefinitions

References EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode (   $default_langcode_key)

Tests the getBaseFieldDefinitions() method with a translatable entity type.

::getBaseFieldDefinitions ::buildBaseFieldDefinitions

providerTestGetBaseFieldDefinitionsTranslatableEntityTypeDefaultLangcode

References EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode (   $provide_key,
  $provide_field,
  $translatable 
)

Tests the getBaseFieldDefinitions() method with a translatable entity type.

::getBaseFieldDefinitions ::buildBaseFieldDefinitions

The Test entity type cannot be translatable as it does not define a translatable "langcode" field.

providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode

References EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetBaseFieldDefinitionsWithCaching ( )

Tests the getBaseFieldDefinitions() method with caching.

::getBaseFieldDefinitions

References Cache\PERMANENT, and EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetExtraFields ( )

::getExtraFields

References Drupal\languageManager(), Drupal\moduleHandler(), Cache\PERMANENT, UnitTestCase\randomMachineName(), and EntityFieldManagerTest\setUpEntityTypeDefinitions().

Here is the call graph for this function:

testGetFieldDefinitions ( )

Tests the getFieldDefinitions() method.

::getFieldDefinitions ::buildBundleFieldDefinitions

References EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetFieldDefinitionsProvider ( )

Tests that getFieldDefinitions() method sets the 'provider' definition key.

::getFieldDefinitions ::buildBundleFieldDefinitions

References Drupal\moduleHandler(), and EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetFieldDefinitionsWithCaching ( )

Tests the getFieldDefinitions() method with caching.

::getFieldDefinitions

References Cache\PERMANENT, and EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetFieldMap ( )

::getFieldMap

References Drupal\moduleHandler(), and EntityFieldManagerTest\setUpEntityTypeDefinitions().

Here is the call graph for this function:

testGetFieldMapByFieldType ( )

::getFieldMapByFieldType

References Drupal\moduleHandler(), and EntityFieldManagerTest\setUpEntityTypeDefinitions().

Here is the call graph for this function:

testGetFieldMapFromCache ( )

::getFieldMap

References EntityFieldManagerTest\setUpEntityTypeDefinitions().

Here is the call graph for this function:

testGetFieldStorageDefinitions ( )

Tests the getFieldStorageDefinitions() method.

::getFieldStorageDefinitions ::buildFieldStorageDefinitions

References Drupal\moduleHandler(), and EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:

testGetFieldStorageDefinitionsWithCaching ( )

Tests the getFieldStorageDefinitions() method with caching.

::getFieldStorageDefinitions

References Drupal\moduleHandler(), Cache\PERMANENT, and EntityFieldManagerTest\setUpEntityWithFieldDefinition().

Here is the call graph for this function:


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