Drupal 8  8.0.2
EntityAutocompleteElementFormTest Class Reference
Inheritance diagram for EntityAutocompleteElementFormTest:

Public Member Functions

 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 testValidEntityAutocompleteElement ()
 
 testInvalidEntityAutocompleteElement ()
 
 testEntityAutocompleteAccess ()
 
- Public Member Functions inherited from FormInterface
 buildForm (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 

Protected Member Functions

 setUp ()
 
 getAutocompleteInput (EntityInterface $entity)
 
- 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

 $testUser
 
 $testAutocreateUser
 
 $referencedEntities
 
- Protected Attributes inherited from EntityUnitTestBase
 $entityManager
 
 $generatedIds = array()
 
 $state
 

Additional Inherited Members

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

Detailed Description

Tests the EntityAutocomplete Form API element.

Form

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state 
)

{}

getAutocompleteInput ( EntityInterface  $entity)
protected

Returns an entity label in the format needed by the EntityAutocomplete element.

Parameters
\Drupal\Core\Entity\EntityInterface$entityA Drupal entity.
Returns
string A string that can be used as a value for EntityAutocomplete elements.

References EntityAutocomplete\getEntityLabels().

Referenced by EntityAutocompleteElementFormTest\testValidEntityAutocompleteElement().

Here is the call graph for this function:

Here is the caller graph for this function:

getFormId ( )

{Returns a unique string identifying the form.

Returns
string The unique string identifying the form.
}

Implements FormInterface.

setUp ( )
protected

{}

References Entity\create(), and Drupal\service().

Here is the call graph for this function:

submitForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

testEntityAutocompleteAccess ( )

Tests that access is properly checked by the EntityAutocomplete element.

References EntityUnitTestBase\createUser(), Drupal\currentUser(), and t().

Here is the call graph for this function:

testInvalidEntityAutocompleteElement ( )

Tests invalid entries in the EntityAutocomplete Form API element.

References t().

Here is the call graph for this function:

testValidEntityAutocompleteElement ( )

Tests valid entries in the EntityAutocomplete Form API element.

References EntityAutocompleteElementFormTest\getAutocompleteInput().

Here is the call graph for this function:

validateForm ( array &  $form,
FormStateInterface  $form_state 
)

{}


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