Drupal 8  8.0.2
EditEntityFieldAccessCheckTest Class Reference
Inheritance diagram for EditEntityFieldAccessCheckTest:

Public Member Functions

 providerTestAccess ()
 
 testAccess ($entity_is_editable, $field_storage_is_accessible, AccessResult $expected_result)
 
 testAccessForbidden ($field_name, $langcode)
 
 providerTestAccessForbidden ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 createMockEntity ()
 
- 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

 $editAccessCheck
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Access quickedit

Member Function Documentation

createMockEntity ( )
protected

Returns a mock entity.

Returns
|

References LanguageInterface\LANGCODE_NOT_SPECIFIED.

Referenced by EditEntityFieldAccessCheckTest\testAccess(), and EditEntityFieldAccessCheckTest\testAccessForbidden().

Here is the caller graph for this function:

providerTestAccess ( )

Provides test data for testAccess().

See Also
::testAccess()

References AccessResult\allowed(), and AccessResult\neutral().

Here is the call graph for this function:

providerTestAccessForbidden ( )

Provides test data for testAccessForbidden.

References LanguageInterface\LANGCODE_NOT_SPECIFIED.

setUp ( )
protected

{}

References Drupal\setContainer().

Here is the call graph for this function:

testAccess (   $entity_is_editable,
  $field_storage_is_accessible,
AccessResult  $expected_result 
)

Tests the method for checking access to routes.

Parameters
bool$entity_is_editableWhether the subject entity is editable.
bool$field_storage_is_accessibleWhether the user has access to the field storage entity.
\Drupal\Core\Access\AccessResult$expected_resultThe expected result of the access call.

providerTestAccess

References AccessResult\allowedIf(), AccessResult\cachePerPermissions(), EditEntityFieldAccessCheckTest\createMockEntity(), and LanguageInterface\LANGCODE_NOT_SPECIFIED.

Here is the call graph for this function:

testAccessForbidden (   $field_name,
  $langcode 
)

Tests checking access to routes that result in AccessResult::isForbidden().

providerTestAccessForbidden

References EditEntityFieldAccessCheckTest\createMockEntity(), and AccessResult\forbidden().

Here is the call graph for this function:


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