Drupal 8  8.0.2
FieldTest Class Reference
Inheritance diagram for FieldTest:

Public Member Functions

 testConstruct ()
 
 testDefineOptionsWithNoOptions ()
 
 testDefineOptionsWithDefaultFormatterOnFieldDefinition ()
 
 testDefineOptionsWithDefaultFormatterOnFieldType ()
 
 testCalculateDependenciesWithBaseField ()
 
 testCalculateDependenciesWithConfiguredField ()
 
 testAccess ()
 
 testClickSortWithOutConfiguredColumn ($order)
 
 testClickSortWithBaseField ($order)
 
 testClickSortWithConfiguredField ($order)
 
 testQueryWithGroupByForBaseField ()
 
 testQueryWithGroupByForConfigField ()
 
 testPrepareItemsByDelta (array $options, array $expected_values)
 
 providerTestPrepareItemsByDelta ()
 
 providerSortOrders ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 getBaseFieldStorage ()
 
 getConfigFieldStorage ()
 
 setupLanguageRenderer (Field $handler, $definition)
 
- 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

 $entityManager
 
 $formatterPluginManager
 
 $languageManager
 
 $fieldTypePluginManager
 
 $renderer
 
 $container
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

views

Member Function Documentation

getBaseFieldStorage ( )
protected

Returns a mocked base field storage object.

Returns
|

Referenced by FieldTest\testAccess(), FieldTest\testCalculateDependenciesWithBaseField(), FieldTest\testClickSortWithBaseField(), FieldTest\testDefineOptionsWithDefaultFormatterOnFieldDefinition(), FieldTest\testDefineOptionsWithDefaultFormatterOnFieldType(), FieldTest\testDefineOptionsWithNoOptions(), and FieldTest\testQueryWithGroupByForBaseField().

Here is the caller graph for this function:

getConfigFieldStorage ( )
protected

Returns a mocked configurable field storage object.

Returns
|

Referenced by FieldTest\testCalculateDependenciesWithConfiguredField(), FieldTest\testClickSortWithConfiguredField(), FieldTest\testPrepareItemsByDelta(), and FieldTest\testQueryWithGroupByForConfigField().

Here is the caller graph for this function:

providerSortOrders ( )

Provides sort orders for clickSort() test methods.

Returns
array
providerTestPrepareItemsByDelta ( )

Provides test data for testPrepareItemsByDelta().

setUp ( )
protected

{}

References Drupal\entityManager(), Drupal\languageManager(), and Drupal\setContainer().

Here is the call graph for this function:

setupLanguageRenderer ( Field  $handler,
  $definition 
)
protected

Setup the mock data needed to make language renderers work.

Parameters
\Drupal\views\Plugin\views\field\Field$handlerThe field handler.
$definitionAn array with entity type definition data.

References Drupal\entityManager().

Referenced by FieldTest\testPrepareItemsByDelta(), FieldTest\testQueryWithGroupByForBaseField(), and FieldTest\testQueryWithGroupByForConfigField().

Here is the call graph for this function:

Here is the caller graph for this function:

testAccess ( )

::access

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testCalculateDependenciesWithBaseField ( )

::calculateDependencies

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testCalculateDependenciesWithConfiguredField ( )

::calculateDependencies

References Drupal\entityManager(), FieldTest\getConfigFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testClickSortWithBaseField (   $order)

providerSortOrders

Parameters
string$orderThe sort order.

::clickSort

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testClickSortWithConfiguredField (   $order)

providerSortOrders

Parameters
string$orderThe sort order.

::clickSort

References Drupal\entityManager(), FieldTest\getConfigFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testClickSortWithOutConfiguredColumn (   $order)

providerSortOrders

Parameters
string$orderThe sort order.

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

Here is the call graph for this function:

testConstruct ( )

::__construct

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

Here is the call graph for this function:

testDefineOptionsWithDefaultFormatterOnFieldDefinition ( )

::defineOptions

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testDefineOptionsWithDefaultFormatterOnFieldType ( )

::defineOptions

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testDefineOptionsWithNoOptions ( )

::defineOptions

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), and Drupal\languageManager().

Here is the call graph for this function:

testPrepareItemsByDelta ( array  $options,
array  $expected_values 
)

::prepareItemsByDelta

providerTestPrepareItemsByDelta

References FieldStorageDefinitionInterface\CARDINALITY_UNLIMITED, Drupal\entityManager(), FieldTest\getConfigFieldStorage(), Drupal\languageManager(), and FieldTest\setupLanguageRenderer().

Here is the call graph for this function:

testQueryWithGroupByForBaseField ( )

::query

References Drupal\entityManager(), FieldTest\getBaseFieldStorage(), Drupal\languageManager(), and FieldTest\setupLanguageRenderer().

Here is the call graph for this function:

testQueryWithGroupByForConfigField ( )

::query

References Drupal\entityManager(), FieldTest\getConfigFieldStorage(), Drupal\languageManager(), and FieldTest\setupLanguageRenderer().

Here is the call graph for this function:


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