Drupal 8  8.0.2
EntityDefinitionUpdateTest Class Reference
Inheritance diagram for EntityDefinitionUpdateTest:

Public Member Functions

 testNewEntityType ()
 
 testNoUpdates ()
 
 testEntityTypeUpdateWithoutData ()
 
 testEntityTypeUpdateWithData ()
 
 testBaseFieldCreateUpdateDeleteWithoutData ()
 
 testBundleFieldCreateUpdateDeleteWithoutData ()
 
 testBaseFieldCreateDeleteWithExistingEntities ()
 
 testBundleFieldCreateDeleteWithExistingEntities ()
 
 testBaseFieldDeleteWithExistingData ()
 
 testBundleFieldDeleteWithExistingData ()
 
 testBaseFieldUpdateWithExistingData ()
 
 testBundleFieldUpdateWithExistingData ()
 
 testEntityIndexCreateDeleteWithoutData ()
 
 testEntityIndexCreateWithData ()
 
 testEntityTypeSchemaUpdateAndBaseFieldCreateWithoutData ()
 
 testEntityTypeSchemaUpdateAndRevisionableBaseFieldCreateWithoutData ()
 
 testSingleActionCalls ()
 
 testCreateFieldAndIndexOnSharedTable ()
 
 testCreateIndexUsingEntityStorageSchemaWithData ()
 
 testLongNameFieldIndexes ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from EntityUnitTestBase
 setUp ()
 
 createUser ($values=array(), $permissions=array())
 
 reloadEntity (EntityInterface $entity)
 
 getHooksInfo ()
 
 installModule ($module)
 
 uninstallModule ($module)
 
 refreshServices ()
 
 generateRandomEntityId ($string=FALSE)
 

Protected Attributes

 $entityDefinitionUpdateManager
 
 $database
 
- Protected Attributes inherited from EntityUnitTestBase
 $entityManager
 
 $generatedIds = array()
 
 $state
 

Additional Inherited Members

- Static Public Attributes inherited from EntityUnitTestBase
static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test']
 

Detailed Description

Tests EntityDefinitionUpdateManager functionality.

Entity

Member Function Documentation

setUp ( )
protected

{}

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testBaseFieldCreateDeleteWithExistingEntities ( )

Tests creating and deleting a base field if entities exist.

This tests deletion when there are existing entities, but not existing data for the field being deleted.

See Also
testBaseFieldDeleteWithExistingData()

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testBaseFieldCreateUpdateDeleteWithoutData ( )

Tests creating, updating, and deleting a base field if no entities exist.

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and t().

Here is the call graph for this function:

testBaseFieldDeleteWithExistingData ( )

Tests deleting a base field when it has existing data.

References Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testBaseFieldUpdateWithExistingData ( )

Tests updating a base field when it has existing data.

References Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testBundleFieldCreateDeleteWithExistingEntities ( )

Tests creating and deleting a bundle field if entities exist.

This tests deletion when there are existing entities, but not existing data for the field being deleted.

See Also
testBundleFieldDeleteWithExistingData()

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), Drupal\entityManager(), and LanguageInterface\LANGCODE_NOT_SPECIFIED.

Here is the call graph for this function:

testBundleFieldCreateUpdateDeleteWithoutData ( )

Tests creating, updating, and deleting a bundle field if no entities exist.

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and t().

Here is the call graph for this function:

testBundleFieldDeleteWithExistingData ( )

Tests deleting a bundle field when it has existing data.

References Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testBundleFieldUpdateWithExistingData ( )

Tests updating a bundle field when it has existing data.

References Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testCreateFieldAndIndexOnSharedTable ( )

Ensures that a new field and index on a shared table are created.

See Also
Drupal::createSharedTableSchema

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and Database\getConnection().

Here is the call graph for this function:

testCreateIndexUsingEntityStorageSchemaWithData ( )

Ensures that a new entity level index is created when data exists.

See Also
Drupal::onEntityTypeUpdate

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), Drupal\entityManager(), Database\getConnection(), and Drupal\state().

Here is the call graph for this function:

testEntityIndexCreateDeleteWithoutData ( )

Tests creating and deleting a multi-field index when there are no existing entities.

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), Drupal\entityManager(), and t().

Here is the call graph for this function:

testEntityIndexCreateWithData ( )

Tests creating a multi-field index when there are existing entities.

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testEntityTypeSchemaUpdateAndBaseFieldCreateWithoutData ( )

Tests updating entity schema and creating a base field.

This tests updating entity schema and creating a base field at the same time when there are no existing entities.

References Drupal\entityDefinitionUpdateManager().

Here is the call graph for this function:

testEntityTypeSchemaUpdateAndRevisionableBaseFieldCreateWithoutData ( )

Tests updating entity schema and creating a revisionable base field.

This tests updating entity schema and creating a revisionable base field at the same time when there are no existing entities.

References Drupal\entityDefinitionUpdateManager().

Here is the call graph for this function:

testEntityTypeUpdateWithData ( )

Tests updating entity schema when there are existing entities.

References Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testEntityTypeUpdateWithoutData ( )

Tests updating entity schema when there are no existing entities.

References Drupal\database(), Drupal\entityDefinitionUpdateManager(), Drupal\entityManager(), and t().

Here is the call graph for this function:

testLongNameFieldIndexes ( )

Check that field schema is correctly handled with long-named fields.

References EntityTestUpdate\baseFieldDefinitions(), Drupal\entityDefinitionUpdateManager(), and Drupal\entityManager().

Here is the call graph for this function:

testNewEntityType ( )

Tests that new entity type definitions are correctly handled.

References Drupal\database(), and Drupal\entityManager().

Here is the call graph for this function:

testNoUpdates ( )

Tests when no definition update is needed.

References Drupal\entityDefinitionUpdateManager().

Here is the call graph for this function:

testSingleActionCalls ( )

Tests applying single updates.

References BaseFieldDefinition\create(), Drupal\database(), Drupal\entityDefinitionUpdateManager(), and t().

Here is the call graph for this function:


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