Drupal 8  8.0.2
EntityFieldTest Class Reference
Inheritance diagram for EntityFieldTest:

Public Member Functions

 testReadWrite ()
 
 testSave ()
 
 testIntrospection ()
 
 testIterator ()
 
 testDataStructureInterfaces ()
 
 getContainedStrings (TypedDataInterface $wrapper, $depth, array &$strings)
 
 testDataTypes ()
 
 testBaseFieldNonExistingBaseField ()
 
 testFieldOverrideBundleField ()
 
 testEntityConstraintValidation ()
 
 testComputedProperties ()
 

Static Public Attributes

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

Protected Member Functions

 setUp ()
 
 createTestEntity ($entity_type)
 
 doTestReadWrite ($entity_type)
 
 doTestSave ($entity_type)
 
 doTestIntrospection ($entity_type)
 
 doTestIterator ($entity_type)
 
 doTestDataStructureInterfaces ($entity_type)
 
 doTestComputedProperties ($entity_type)
 
- 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

 $entityName
 
 $entityUser
 
 $entityFieldText
 
- Protected Attributes inherited from EntityUnitTestBase
 $entityManager
 
 $generatedIds = array()
 
 $state
 

Detailed Description

Tests the Entity Field API.

Entity

Member Function Documentation

createTestEntity (   $entity_type)
protected

Creates a test entity.

Returns

References EntityUnitTestBase\createUser().

Referenced by EntityFieldTest\doTestReadWrite().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestComputedProperties (   $entity_type)
protected

Executes the computed properties tests for the given entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

References format_string().

Here is the call graph for this function:

doTestDataStructureInterfaces (   $entity_type)
protected

Executes the data structure interfaces tests for the given entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

References format_string().

Here is the call graph for this function:

doTestIntrospection (   $entity_type)
protected

Executes the introspection tests for the given entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

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

Here is the call graph for this function:

doTestIterator (   $entity_type)
protected

Executes the iterator tests for the given entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

References format_string().

Here is the call graph for this function:

doTestReadWrite (   $entity_type)
protected

Executes the read write test set for a defined entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

References EntityFieldTest\createTestEntity(), EntityUnitTestBase\createUser(), Drupal\entityManager(), and format_string().

Referenced by EntityFieldTest\testReadWrite().

Here is the call graph for this function:

Here is the caller graph for this function:

doTestSave (   $entity_type)
protected

Executes the save tests for the given entity type.

Parameters
string$entity_typeThe entity type to run the tests with.

References format_string().

Here is the call graph for this function:

getContainedStrings ( TypedDataInterface  $wrapper,
  $depth,
array &  $strings 
)

Recursive helper for getting all contained strings, i.e. properties of type string.

testBaseFieldNonExistingBaseField ( )

Tests a base field override on a non-existing base field.

See Also
entity_test_entity_base_field_info_alter()

References Drupal\state().

Here is the call graph for this function:

testComputedProperties ( )

Tests getting processed property values via a computed property.

testDataStructureInterfaces ( )

Tests working with the entity based upon the TypedData API.

testDataTypes ( )

Makes sure data types are correctly derived for all entity types.

References Drupal\typedDataManager().

Here is the call graph for this function:

testEntityConstraintValidation ( )

Tests validation constraints provided by the Entity API.

References Drupal\typedDataManager().

Here is the call graph for this function:

testFieldOverrideBundleField ( )

Tests creating a field override config for a bundle field.

See Also
entity_test_entity_base_field_info_alter()
testIntrospection ( )

Tests introspection and getting metadata upfront.

testIterator ( )

Tests iterating over properties.

testReadWrite ( )

Tests reading and writing properties and field items.

References EntityFieldTest\doTestReadWrite().

Here is the call graph for this function:

testSave ( )

Tries to save and load an entity again.


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