Drupal 8  8.0.2
PermissionHandlerTest Class Reference
Inheritance diagram for PermissionHandlerTest:

Public Member Functions

 testBuildPermissionsYaml ()
 
 testBuildPermissionsSortPerModule ()
 
 testBuildPermissionsYamlCallback ()
 
 testPermissionsYamlStaticAndCallback ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 mockModuleExtension ($module, $name)
 
 assertPermissions (array $actual_permissions)
 
- 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

 $permissionHandler
 
 $moduleHandler
 
 $stringTranslation
 
 $controllerResolver
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Tests the permission handler.

user

Member Function Documentation

assertPermissions ( array  $actual_permissions)
protected

Checks that the permissions are like expected.

Parameters
array$actual_permissionsThe actual permissions

Referenced by PermissionHandlerTest\testBuildPermissionsYaml(), and PermissionHandlerTest\testBuildPermissionsYamlCallback().

Here is the caller graph for this function:

mockModuleExtension (   $module,
  $name 
)
protected

Provides an extension object for a given module with a human name.

Parameters
string$moduleThe module machine name.
string$nameThe module human name.
Returns
The extension object.

References Drupal\root().

Referenced by PermissionHandlerTest\testBuildPermissionsYaml(), PermissionHandlerTest\testBuildPermissionsYamlCallback(), and PermissionHandlerTest\testPermissionsYamlStaticAndCallback().

Here is the call graph for this function:

Here is the caller graph for this function:

setUp ( )
protected

{}

testBuildPermissionsSortPerModule ( )

Tests permissions sort inside a module.

::__construct ::getPermissions ::buildPermissionsYaml ::sortPermissions

References Drupal\moduleHandler().

Here is the call graph for this function:

testBuildPermissionsYaml ( )

Tests permissions provided by YML files.

::__construct ::getPermissions ::buildPermissionsYaml ::moduleProvidesPermissions

References PermissionHandlerTest\assertPermissions(), PermissionHandlerTest\mockModuleExtension(), and Drupal\moduleHandler().

Here is the call graph for this function:

testBuildPermissionsYamlCallback ( )

Tests dynamic callback permissions provided by YML files.

::__construct ::getPermissions ::buildPermissionsYaml

References PermissionHandlerTest\assertPermissions(), PermissionHandlerTest\mockModuleExtension(), and Drupal\moduleHandler().

Here is the call graph for this function:

testPermissionsYamlStaticAndCallback ( )

Tests a YAML file containing both static permissions and a callback.

References PermissionHandlerTest\mockModuleExtension(), and Drupal\moduleHandler().

Here is the call graph for this function:


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