Drupal 8  8.0.2
ContentEntityBaseUnitTest Class Reference
Inheritance diagram for ContentEntityBaseUnitTest:

Public Member Functions

 testIsNewRevision ()
 
 testSetNewRevisionException ()
 
 testIsDefaultRevision ()
 
 testGetRevisionId ()
 
 testIsTranslatable ()
 
 testIsTranslatableForMonolingual ()
 
 testPreSaveRevision ()
 
 testBundle ()
 
 testAccess ()
 
 testLabel ()
 
 providerGet ()
 
 testGet ($expected, $field_name, $active_langcode, $fields)
 
 providerGetFields ()
 
 testGetFields ($expected, $include_computed, $is_computed, $field_definitions)
 
 testSet ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

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

 $bundle
 
 $entity
 
 $entityUnd
 
 $entityType
 
 $entityManager
 
 $entityTypeId
 
 $typedDataManager
 
 $fieldTypePluginManager
 
 $languageManager
 
 $uuid
 
 $id
 
 $fieldDefinitions
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Entity Access

Member Function Documentation

providerGet ( )

Data provider for testGet().

Returns
  • Expected output from get().
  • Field name parameter to get().
  • Language code for $activeLanguage.
  • Fields array for $fields.
providerGetFields ( )

Data provider for testGetFields().

Returns
array
  • Expected output from getFields().
  • $include_computed value to pass to getFields().
  • Value to mock from all field definitions for isComputed().
  • Array of field names to return from mocked getFieldDefinitions(). A Drupal object will be mocked for each name.
setUp ( )
protected

{}

References BaseFieldDefinition\create(), Drupal\entityManager(), LanguageInterface\LANGCODE_DEFAULT, LanguageInterface\LANGCODE_NOT_SPECIFIED, Drupal\languageManager(), UnitTestCase\randomMachineName(), Drupal\setContainer(), and Drupal\typedDataManager().

Here is the call graph for this function:

testAccess ( )

::access

References AccessResult\allowed(), Drupal\entityManager(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testBundle ( )

::bundle

testGet (   $expected,
  $field_name,
  $active_langcode,
  $fields 
)

::get providerGet

testGetFields (   $expected,
  $include_computed,
  $is_computed,
  $field_definitions 
)

::getFields providerGetFields

References UnitTestCase\assertArrayEquals().

Here is the call graph for this function:

testGetRevisionId ( )

::getRevisionId

testIsDefaultRevision ( )

::isDefaultRevision

testIsNewRevision ( )

::isNewRevision ::setNewRevision

testIsTranslatable ( )

::isTranslatable

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

Here is the call graph for this function:

testIsTranslatableForMonolingual ( )

::isTranslatable

References Drupal\languageManager().

Here is the call graph for this function:

testLabel ( )

::label

References UnitTestCase\randomMachineName().

Here is the call graph for this function:

testPreSaveRevision ( )

::preSaveRevision

testSet ( )

::set

testSetNewRevisionException ( )

::setNewRevision


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