Drupal 8  8.0.2
DefaultTableMappingTest Class Reference
Inheritance diagram for DefaultTableMappingTest:

Public Member Functions

 testGetTableNames ()
 
 testGetAllColumns ()
 
 testGetFieldNames ()
 
 testGetColumnNames ()
 
 testGetExtraColumns ()
 
 testGetFieldColumnName ($base_field, $columns, $column, $expected)
 
 testGetFieldColumnNameInvalid ($base_field, $columns, $column)
 
 providerTestGetFieldColumnName ()
 
 testGetFieldTableName ($table_names, $expected)
 
 providerTestGetFieldTableName ()
 
 testGetFieldTableNameInvalid ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setUpDefinition ($name, array $column_names, $base_field=TRUE)
 
- 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

 $entityType
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Entity

Member Function Documentation

providerTestGetFieldColumnName ( )

Provides test data for testGetFieldColumnName().

Returns
array[] An nested array where each inner array has the following values: test field name, base field status, list of field columns, name of the column to be retrieved, expected result, whether an exception is expected.
providerTestGetFieldTableName ( )

Provides test data for testGetFieldColumnName().

Returns
array[] A nested array where each inner array has the following values: a list of table names and the expected table name.
setUp ( )
protected

{}

setUpDefinition (   $name,
array  $column_names,
  $base_field = TRUE 
)
protected

Sets up a field storage definition for the test.

Parameters
string$nameThe field name.
array$column_namesAn array of column names for the storage definition.
Returns
|

Referenced by DefaultTableMappingTest\testGetAllColumns(), DefaultTableMappingTest\testGetColumnNames(), DefaultTableMappingTest\testGetFieldColumnName(), DefaultTableMappingTest\testGetFieldColumnNameInvalid(), and DefaultTableMappingTest\testGetFieldTableName().

Here is the caller graph for this function:

testGetAllColumns ( )

Tests DefaultTableMapping::getAllColumns().

::__construct ::getAllColumns ::getFieldNames ::getColumnNames ::setFieldNames ::getExtraColumns ::setExtraColumns

References DefaultTableMappingTest\setUpDefinition().

Here is the call graph for this function:

testGetColumnNames ( )

Tests DefaultTableMapping::getColumnNames().

::__construct ::getColumnNames

References DefaultTableMappingTest\setUpDefinition().

Here is the call graph for this function:

testGetExtraColumns ( )

Tests DefaultTableMapping::getExtraColumns().

::getExtraColumns ::setExtraColumns

testGetFieldColumnName (   $base_field,
  $columns,
  $column,
  $expected 
)

Tests DefaultTableMapping::getFieldColumnName() with valid parameters.

Parameters
bool$base_fieldFlag indicating whether the field should be treated as a base or bundle field.
string[]$columns An array of available field column names.
string$columnThe name of the column to be processed.
string$expectedThe expected result.

::getFieldColumnName

providerTestGetFieldColumnName

References DefaultTableMappingTest\setUpDefinition().

Here is the call graph for this function:

testGetFieldColumnNameInvalid (   $base_field,
  $columns,
  $column 
)

Tests DefaultTableMapping::getFieldColumnName() with invalid parameters.

Parameters
bool$base_fieldFlag indicating whether the field should be treated as a base or bundle field.
string[]$columns An array of available field column names.
string$columnThe name of the column to be processed.

Column information not available for the 'test' field.

::getFieldColumnName

providerTestGetFieldColumnName

References DefaultTableMappingTest\setUpDefinition().

Here is the call graph for this function:

testGetFieldNames ( )

Tests DefaultTableMapping::getFieldNames().

::getFieldNames ::setFieldNames

testGetFieldTableName (   $table_names,
  $expected 
)

Tests DefaultTableMapping::getFieldTableName().

Parameters
string[]$table_names An associative array of table names that should hold the field columns, where keys can be 'base', 'data' and 'revision'.
string$expectedThe expected table name.

::getFieldTableName

providerTestGetFieldTableName

References Drupal\setContainer(), and DefaultTableMappingTest\setUpDefinition().

Here is the call graph for this function:

testGetFieldTableNameInvalid ( )

Tests DefaultTableMapping::getFieldTableName() with an invalid parameter.

Table information not available for the 'invalid_field_name' field.

::getFieldTableName

testGetTableNames ( )

Tests DefaultTableMapping::getTableNames().

::getTableNames


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