Drupal 8  8.0.2
BaseFieldDefinitionTest Class Reference
Inheritance diagram for BaseFieldDefinitionTest:

Public Member Functions

 testFieldName ()
 
 testFieldLabel ()
 
 testFieldDescription ()
 
 testFieldType ()
 
 testFieldSettings ()
 
 testDefaultFieldSettings ()
 
 testFieldDefaultValue ()
 
 testFieldTranslatable ()
 
 testFieldRevisionable ()
 
 testFieldCardinality ()
 
 testFieldRequired ()
 
 testFieldProvider ()
 
 testCustomStorage ()
 
 testDefaultValueCallback ()
 
 testInvalidDefaultValueCallback ()
 
 testNullDefaultValueCallback ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Static Public Member Functions

static mockDefaultValueCallback ($entity, $definition)
 

Protected Member Functions

 setUp ()
 
- 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

 $fieldType
 
 $fieldTypeDefinition
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Unit test for BaseFieldDefinition.

Entity

Member Function Documentation

static mockDefaultValueCallback (   $entity,
  $definition 
)
static

Provides a Mock base field default value callback.

Parameters
\Drupal\Core\Entity\EntityInterface$entityEntity interface.
\Drupal\Core\Field\FieldDefinitionInterface$definitionField definition.
Returns
string Default value.
setUp ( )
protected

{}

References UnitTestCase\randomMachineName(), and Drupal\setContainer().

Here is the call graph for this function:

testCustomStorage ( )

Tests custom storage.

::hasCustomStorage ::setCustomStorage

References BaseFieldDefinition\create().

Here is the call graph for this function:

testDefaultFieldSettings ( )

Tests the initialization of default field settings.

::getSetting ::setSetting ::getSettings

References BaseFieldDefinition\create().

Here is the call graph for this function:

testDefaultValueCallback ( )

Tests default value callbacks.

::setDefaultValueCallback

References BaseFieldDefinition\create().

Here is the call graph for this function:

testFieldCardinality ( )

Tests field cardinality.

::getCardinality ::setCardinality

References FieldStorageDefinitionInterface\CARDINALITY_UNLIMITED, and BaseFieldDefinition\create().

Here is the call graph for this function:

testFieldDefaultValue ( )

Tests field default value.

::getDefaultValue ::setDefaultValue

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldDescription ( )

Tests field description methods.

::getDescription

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldLabel ( )

Tests field label methods.

::getLabel

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldName ( )

Tests field name methods.

::getName

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldProvider ( )

Tests provider.

::getProvider ::setProvider

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldRequired ( )

Tests required.

::isRequired ::setRequired

References BaseFieldDefinition\create().

Here is the call graph for this function:

testFieldRevisionable ( )

Tests field revisionable methods.

::isRevisionable ::setRevisionable

References BaseFieldDefinition\create().

Here is the call graph for this function:

testFieldSettings ( )

Tests field settings methods.

::getSetting ::setSetting ::getSettings

References BaseFieldDefinition\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testFieldTranslatable ( )

Tests field translatable methods.

::isTranslatable ::setTranslatable

References BaseFieldDefinition\create().

Here is the call graph for this function:

testFieldType ( )

Tests field type methods.

::getType

References BaseFieldDefinition\create().

Here is the call graph for this function:

testInvalidDefaultValueCallback ( )

Tests invalid default value callbacks.

::setDefaultValueCallback

References BaseFieldDefinition\create().

Here is the call graph for this function:

testNullDefaultValueCallback ( )

Tests NULL default value callbacks.

::setDefaultValueCallback

References BaseFieldDefinition\create().

Here is the call graph for this function:


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