You are here

protected function CommerceCouponTestBase::permissionBuilder in Commerce Coupon 7.2

Overrides CommerceBaseTestCase::permissionBuilder().

Overrides CommerceBaseTestCase::permissionBuilder

File

./commerce_coupon.test, line 39
Commerce Coupon tests.

Class

CommerceCouponTestBase
Base class for Commerce Discount tests

Code

protected function permissionBuilder($set) {
  $permissions = parent::permissionBuilder($set);
  switch ($set) {
    case 'store admin':
    case 'site admin':
      $permissions[] = 'administer commerce discounts';
      $permissions[] = 'administer commerce_coupon entities';
      $permissions[] = 'redeem any coupon';
      break;
    case 'customer':
      $permissions[] = 'redeem any coupon';
      break;
  }
  return $permissions;
}