Drupal 8  8.0.2
SqlContentEntityStorageSchemaTest Class Reference
Inheritance diagram for SqlContentEntityStorageSchemaTest:

Public Member Functions

 testGetSchemaBase ()
 
 testGetSchemaRevisionable ()
 
 testGetSchemaTranslatable ()
 
 testGetSchemaRevisionableTranslatable ()
 
 testDedicatedTableSchema ()
 
 testDedicatedTableSchemaForEntityWithStringIdentifier ()
 
 providerTestRequiresEntityDataMigration ()
 
 testRequiresEntityDataMigration ($updated_entity_type_definition, $original_entity_type_definition, $original_storage_has_data, $shared_table_structure_changed, $migration_required)
 
 providerTestRequiresEntityStorageSchemaChanges ()
 
 testRequiresEntityStorageSchemaChanges (ContentEntityTypeInterface $updated, ContentEntityTypeInterface $original, $requires_change, $change_schema, $change_shared_table)
 
 setUpStorageDefinition ($field_name, array $schema)
 
 testonEntityTypeUpdateWithNewIndex ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setUpStorageSchema (array $expected=array())
 
- 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

 $dbSchemaHandler
 
 $entityManager
 
 $entityType
 
 $storage
 
 $storageDefinitions
 
 $storageSchema
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Entity

Member Function Documentation

providerTestRequiresEntityStorageSchemaChanges ( )

Data provider for ::testRequiresEntityStorageSchemaChanges().

setUp ( )
protected

{}

References Drupal\entityManager(), and SqlContentEntityStorageSchemaTest\setUpStorageDefinition().

Here is the call graph for this function:

setUpStorageDefinition (   $field_name,
array  $schema 
)
setUpStorageSchema ( array  $expected = array())
protected

Sets up the storage schema object to test.

This uses the field definitions set in $this->storageDefinitions.

Parameters
array$expected(optional) An associative array describing the expected entity schema to be created. Defaults to expecting nothing.

References Drupal\entityManager().

Referenced by SqlContentEntityStorageSchemaTest\testDedicatedTableSchema(), SqlContentEntityStorageSchemaTest\testDedicatedTableSchemaForEntityWithStringIdentifier(), SqlContentEntityStorageSchemaTest\testGetSchemaBase(), SqlContentEntityStorageSchemaTest\testGetSchemaRevisionable(), SqlContentEntityStorageSchemaTest\testGetSchemaRevisionableTranslatable(), SqlContentEntityStorageSchemaTest\testGetSchemaTranslatable(), SqlContentEntityStorageSchemaTest\testonEntityTypeUpdateWithNewIndex(), and SqlContentEntityStorageSchemaTest\testRequiresEntityStorageSchemaChanges().

Here is the call graph for this function:

Here is the caller graph for this function:

testDedicatedTableSchema ( )

Tests the schema for a field dedicated table.

::onFieldStorageDefinitionCreate ::getDedicatedTableSchema ::createDedicatedTableSchema

References UnitTestCase\getRandomGenerator(), SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testDedicatedTableSchemaForEntityWithStringIdentifier ( )

Tests the schema for a field dedicated table for an entity with a string identifier.

::onFieldStorageDefinitionCreate ::getDedicatedTableSchema ::createDedicatedTableSchema

References UnitTestCase\getRandomGenerator(), SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testGetSchemaBase ( )

Tests the schema for non-revisionable, non-translatable entities.

::__construct ::getEntitySchemaTables ::initializeBaseTable ::addTableDefaults ::getEntityIndexName ::getFieldIndexes ::getFieldUniqueKeys ::getFieldForeignKeys ::getFieldSchemaData ::processBaseTable ::processIdentifierSchema

References SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testGetSchemaRevisionable ( )

Tests the schema for revisionable, non-translatable entities.

::__construct ::getEntitySchemaTables ::initializeBaseTable ::initializeRevisionTable ::addTableDefaults ::getEntityIndexName ::processRevisionTable ::processIdentifierSchema

References SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testGetSchemaRevisionableTranslatable ( )

Tests the schema for revisionable, translatable entities.

::__construct ::getEntitySchemaTables ::initializeDataTable ::addTableDefaults ::getEntityIndexName ::initializeRevisionDataTable ::processRevisionDataTable

References SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testGetSchemaTranslatable ( )

Tests the schema for non-revisionable, translatable entities.

::__construct ::getEntitySchemaTables ::initializeDataTable ::addTableDefaults ::getEntityIndexName ::processDataTable

References SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testonEntityTypeUpdateWithNewIndex ( )

::onEntityTypeUpdate

References SqlContentEntityStorageSchemaTest\setUpStorageDefinition(), and SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:

testRequiresEntityDataMigration (   $updated_entity_type_definition,
  $original_entity_type_definition,
  $original_storage_has_data,
  $shared_table_structure_changed,
  $migration_required 
)

::requiresEntityDataMigration

providerTestRequiresEntityDataMigration

References Drupal\entityManager().

Here is the call graph for this function:

testRequiresEntityStorageSchemaChanges ( ContentEntityTypeInterface  $updated,
ContentEntityTypeInterface  $original,
  $requires_change,
  $change_schema,
  $change_shared_table 
)

::requiresEntityStorageSchemaChanges

providerTestRequiresEntityStorageSchemaChanges

References SqlContentEntityStorageSchemaTest\setUpStorageSchema().

Here is the call graph for this function:


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