You are here

protected function CommerceMigrateBaseTestCase::permissionBuilder in Commerce Migrate 7

Helper function to get different combinations of permission sets.

Parameters

$set: Can be a single string (from the following) or can be an array containing multiple values that should be merged: 'site admin': Admin permissions for Drupal core modules 'store admin': All commerce "administer X" permissions

Overrides CommerceBaseTestCase::permissionBuilder

File

tests/commerce_migrate_base.test, line 39
Base facade for "Commerce Migrate" tests.

Class

CommerceMigrateBaseTestCase
Class CommerceMigrateBaseTestCase.

Code

protected function permissionBuilder($set) {
  $permissions = parent::permissionBuilder($set);
  switch ($set) {
    case 'store admin':
    case 'site admin':
      $permissions[] = MIGRATE_ACCESS_BASIC;
      $permissions[] = MIGRATE_ACCESS_ADVANCED;
      break;
  }
  return $permissions;
}