Drupal 8  8.0.2
EntityAutocompleteTest Class Reference
Inheritance diagram for EntityAutocompleteTest:

Public Member Functions

 testEntityReferenceAutocompletion ()
 testSelectionSettingsHandling ()

Protected Member Functions

 setUp ()
 getAutocompleteResult ($input)
- 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

 $entityType = 'entity_test'
 $bundle = 'entity_test'
- Protected Attributes inherited from EntityUnitTestBase
 $generatedIds = array()

Additional Inherited Members

- Static Public Attributes inherited from EntityUnitTestBase
static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test']

Detailed Description

Tests the autocomplete functionality.


Member Function Documentation

getAutocompleteResult (   $input)

Returns the result of an Entity reference autocomplete request.

string$inputThe label of the entity to query by.
mixed The JSON value encoded in its appropriate PHP type.

References EntityAutocompleteController\create(), Json\decode(), Settings\getHashSalt(), Crypt\hmacBase64(), and Drupal\keyValue().

Referenced by EntityAutocompleteTest\testEntityReferenceAutocompletion().

Here is the call graph for this function:

Here is the caller graph for this function:

setUp ( )


testEntityReferenceAutocompletion ( )

Tests autocompletion edge cases with slashes in the names.

References Tags\encode(), Html\escape(), and EntityAutocompleteTest\getAutocompleteResult().

Here is the call graph for this function:

testSelectionSettingsHandling ( )

Tests that missing or invalid selection setting key are handled correctly.

References EntityAutocompleteController\create(), Settings\getHashSalt(), Crypt\hmacBase64(), and Drupal\keyValue().

Here is the call graph for this function:

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