Drupal 8  8.0.2
UserAccessControlHandlerTest Class Reference
Inheritance diagram for UserAccessControlHandlerTest:

Public Member Functions

 assertFieldAccess ($field, $viewer, $target, $view, $edit)
 
 testUserNameAccess ($viewer, $target, $view, $edit)
 
 userNameProvider ()
 
 testHiddenUserSettings ($field, $viewer, $target, $view, $edit)
 
 hiddenUserSettingsProvider ()
 
 testAdminFieldAccess ($field, $viewer, $target, $view, $edit)
 
 adminFieldAccessProvider ()
 
 testPasswordAccess ($viewer, $target, $view, $edit)
 
 passwordAccessProvider ()
 
 testCreatedAccess ($viewer, $target, $view, $edit)
 
 createdAccessProvider ()
 
 testNonExistingFieldAccess ($viewer, $target, $view, $edit)
 
 NonExistingFieldAccessProvider ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

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

 $accessControlHandler
 
 $viewer
 
 $owner
 
 $admin
 
 $items
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Tests the user access controller.

Drupal User

Member Function Documentation

adminFieldAccessProvider ( )

Provides test data for testAdminFieldAccess().

assertFieldAccess (   $field,
  $viewer,
  $target,
  $view,
  $edit 
)

Asserts correct field access grants for a field.

createdAccessProvider ( )

Provides test data for testCreatedAccess().

hiddenUserSettingsProvider ( )

Provides test data for testHiddenUserSettings().

NonExistingFieldAccessProvider ( )

Provides test data for testNonExistingFieldAccess().

passwordAccessProvider ( )

Provides test data for passwordAccessProvider().

setUp ( )
protected

{}

References AccessResult\allowed(), and Drupal\setContainer().

Here is the call graph for this function:

testAdminFieldAccess (   $field,
  $viewer,
  $target,
  $view,
  $edit 
)

Tests that private user settings cannot be viewed by other users.

adminFieldAccessProvider

testCreatedAccess (   $viewer,
  $target,
  $view,
  $edit 
)

Tests the user created field access.

createdAccessProvider

testHiddenUserSettings (   $field,
  $viewer,
  $target,
  $view,
  $edit 
)

Tests that private user settings cannot be viewed by other users.

hiddenUserSettingsProvider

testNonExistingFieldAccess (   $viewer,
  $target,
  $view,
  $edit 
)

Tests access to a non-existing base field.

NonExistingFieldAccessProvider

testPasswordAccess (   $viewer,
  $target,
  $view,
  $edit 
)

Tests that passwords cannot be viewed, just edited.

passwordAccessProvider

testUserNameAccess (   $viewer,
  $target,
  $view,
  $edit 
)

Ensures user name access is working properly.

userNameProvider

userNameProvider ( )

Provides test data for estUserNameAccess().


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