Drupal 8  8.0.2
KeyValueEntityStorageTest Class Reference
Inheritance diagram for KeyValueEntityStorageTest:

Public Member Functions

 testCreateWithPredefinedUuid ()
 
 testCreateWithoutUuidKey ()
 
 testCreate ()
 
 testSaveInsert (EntityInterface $entity)
 
 testSaveUpdate (EntityInterface $entity)
 
 testSaveConfigEntity ()
 
 testSaveRenameConfigEntity (ConfigEntityInterface $entity)
 
 testSaveContentEntity ()
 
 testSaveInvalid ()
 
 testSaveDuplicate ()
 
 testLoad ()
 
 testLoadMissingEntity ()
 
 testLoadMultipleAll ()
 
 testLoadMultipleIds ()
 
 testLoadRevision ()
 
 testDeleteRevision ()
 
 testDelete ()
 
 testDeleteNothing ()
 
 getMockEntity ($class= 'Drupal\Core\Entity\Entity', array $arguments=array(), $methods=array())
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setUpKeyValueEntityStorage ($uuid_key= 'uuid')
 
- 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
 
 $keyValueStore
 
 $moduleHandler
 
 $uuidService
 
 $languageManager
 
 $entityStorage
 
 $entityManager
 
 $cacheTagsInvalidator
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Entity

Member Function Documentation

getMockEntity (   $class = 'Drupal\Core\Entity\Entity',
array  $arguments = array(),
  $methods = array() 
)

Creates an entity with specific methods mocked.

Parameters
string$class(optional) The concrete entity class to mock. Defaults to 'Drupal'.
array$arguments(optional) Arguments to pass to the constructor. An empty set of values and an entity type ID will be provided.
array$methods(optional) The methods to mock.
Returns
|

Referenced by KeyValueEntityStorageTest\testCreate(), KeyValueEntityStorageTest\testCreateWithoutUuidKey(), KeyValueEntityStorageTest\testCreateWithPredefinedUuid(), KeyValueEntityStorageTest\testDelete(), KeyValueEntityStorageTest\testLoad(), KeyValueEntityStorageTest\testLoadMultipleAll(), KeyValueEntityStorageTest\testLoadMultipleIds(), KeyValueEntityStorageTest\testSaveConfigEntity(), KeyValueEntityStorageTest\testSaveContentEntity(), KeyValueEntityStorageTest\testSaveDuplicate(), and KeyValueEntityStorageTest\testSaveInvalid().

Here is the caller graph for this function:

setUp ( )
protected

{}

testCreate ( )

::create ::doCreate

Returns

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testCreateWithoutUuidKey ( )

::create ::doCreate

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testCreateWithPredefinedUuid ( )

::create ::doCreate

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testDelete ( )

::delete ::doDelete

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testDeleteNothing ( )

::delete ::doDelete

References Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testDeleteRevision ( )

::deleteRevision

References KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testLoad ( )

::load ::postLoad

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testLoadMissingEntity ( )

::load

References Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testLoadMultipleAll ( )

::loadMultiple ::postLoad ::mapFromStorageRecords ::doLoadMultiple

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testLoadMultipleIds ( )

::loadMultiple ::postLoad ::mapFromStorageRecords ::doLoadMultiple

References KeyValueEntityStorageTest\getMockEntity(), Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testLoadRevision ( )

::loadRevision

References KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveConfigEntity ( )

::save ::doSave

References KeyValueEntityStorageTest\getMockEntity(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveContentEntity ( )

::save ::doSave

References KeyValueEntityStorageTest\getMockEntity(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveDuplicate ( )

::save ::doSave

'test_entity_type' entity with ID 'foo' already exists

References KeyValueEntityStorageTest\getMockEntity(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveInsert ( EntityInterface  $entity)

::save ::doSave

Parameters
\Drupal\Core\Entity\EntityInterface$entity
Returns

testCreate

References Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveInvalid ( )

::save ::doSave

The entity does not have an ID.

References KeyValueEntityStorageTest\getMockEntity(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveRenameConfigEntity ( ConfigEntityInterface  $entity)

::save ::doSave

testSaveConfigEntity

References EntityInterface\getOriginalId(), Drupal\moduleHandler(), ConfigEntityInterface\set(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:

testSaveUpdate ( EntityInterface  $entity)

::save ::doSave

Parameters
\Drupal\Core\Entity\EntityInterface$entity
Returns

testSaveInsert

References Drupal\moduleHandler(), and KeyValueEntityStorageTest\setUpKeyValueEntityStorage().

Here is the call graph for this function:


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