Drupal 8  8.0.2
EntityCrudHookTest Class Reference
Inheritance diagram for EntityCrudHookTest:

Public Member Functions

 testBlockHooks ()
 
 testCommentHooks ()
 
 testFileHooks ()
 
 testNodeHooks ()
 
 testTaxonomyTermHooks ()
 
 testTaxonomyVocabularyHooks ()
 
 testUserHooks ()
 
 testEntityRollback ()
 

Static Public Attributes

static $modules = array('block', 'block_test', 'entity_crud_hook_test', 'file', 'taxonomy', 'node', 'comment')
 
- Static Public Attributes inherited from EntityUnitTestBase
static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test']
 

Protected Member Functions

 setUp ()
 
 assertHookMessageOrder ($messages)
 
- Protected Member Functions inherited from EntityUnitTestBase
 setUp ()
 
 createUser ($values=array(), $permissions=array())
 
 reloadEntity (EntityInterface $entity)
 
 getHooksInfo ()
 
 installModule ($module)
 
 uninstallModule ($module)
 
 refreshServices ()
 
 generateRandomEntityId ($string=FALSE)
 

Protected Attributes

 $ids = array()
 
- Protected Attributes inherited from EntityUnitTestBase
 $entityManager
 
 $generatedIds = array()
 
 $state
 

Detailed Description

Tests the invocation of hooks when creating, inserting, loading, updating or deleting an entity.

Tested hooks are:

These hooks are each tested for several entity types.

Entity

Member Function Documentation

assertHookMessageOrder (   $messages)
protected

Checks the order of CRUD hook execution messages.

entity_crud_hook_test.module implements all core entity CRUD hooks and stores a message for each in $GLOBALS['entity_crud_hook_test'].

Parameters
$messagesAn array of plain-text messages in the order they should appear.

Referenced by EntityCrudHookTest\testBlockHooks(), EntityCrudHookTest\testCommentHooks(), EntityCrudHookTest\testFileHooks(), EntityCrudHookTest\testNodeHooks(), EntityCrudHookTest\testTaxonomyTermHooks(), EntityCrudHookTest\testTaxonomyVocabularyHooks(), and EntityCrudHookTest\testUserHooks().

Here is the caller graph for this function:

testBlockHooks ( )

Tests hook invocations for CRUD operations on blocks.

References EntityCrudHookTest\assertHookMessageOrder(), and Entity\load().

Here is the call graph for this function:

testCommentHooks ( )

Tests hook invocations for CRUD operations on comments.

References EntityCrudHookTest\assertHookMessageOrder(), EntityUnitTestBase\createUser(), LanguageInterface\LANGCODE_NOT_SPECIFIED, Entity\load(), and CommentItemInterface\OPEN.

Here is the call graph for this function:

testEntityRollback ( )

Tests rollback from failed entity save.

References Drupal\entityQuery(), and Database\getConnection().

Here is the call graph for this function:

testFileHooks ( )

Tests hook invocations for CRUD operations on files.

References EntityCrudHookTest\assertHookMessageOrder(), and Entity\load().

Here is the call graph for this function:

testNodeHooks ( )

Tests hook invocations for CRUD operations on nodes.

References EntityCrudHookTest\assertHookMessageOrder(), EntityUnitTestBase\createUser(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Entity\load().

Here is the call graph for this function:

testTaxonomyTermHooks ( )

Tests hook invocations for CRUD operations on taxonomy terms.

References EntityCrudHookTest\assertHookMessageOrder(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Entity\load().

Here is the call graph for this function:

testTaxonomyVocabularyHooks ( )

Tests hook invocations for CRUD operations on taxonomy vocabularies.

References EntityCrudHookTest\assertHookMessageOrder(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Entity\load().

Here is the call graph for this function:

testUserHooks ( )

Tests hook invocations for CRUD operations on users.

References EntityCrudHookTest\assertHookMessageOrder(), and Entity\load().

Here is the call graph for this function:


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