You are here

public function CommercePricelistTestCase::createAdminUser in Commerce Pricelist 7

Creates an admin user.

Parameters

array $permissions:

Return value

user object

2 calls to CommercePricelistTestCase::createAdminUser()
CommercePricelistFeedsTestCaseSimpleProduct::setUp in commerce_pricelist_feeds/tests/commerce_pricelist_feeds.test
Implementation of setUp().
CommercePricelistTestCase::setUp in tests/commerce_pricelist.test
Helper function to perform the common test tasks for price list testing.

File

tests/commerce_pricelist.test, line 115
Functional tests for the commerce price list module.

Class

CommercePricelistTestCase
Abstract class for Commerce price list testing. All Commerce price list tests should extend this class.

Code

public function createAdminUser(array $permissions = array()) {
  $permissions += array(
    'administer commerce_pricelist_list entities',
    'view any commerce_pricelist_list entity',
    'edit any commerce_pricelist_list entity',
    'create commerce_pricelist_list entities',
  );
  $permissions += $this
    ->permissionBuilder(array(
    'store admin',
    'site admin',
  ));
  return $this
    ->drupalCreateUser($permissions);
}