You are here

public function CommerceNodeCheckoutBaseTest::createAdmin in Commerce Node Checkout 7

Create an admin with all required permissions.

Parameters

$perms: Any additional permissions to add to the user.

Return value

The created used.

1 call to CommerceNodeCheckoutBaseTest::createAdmin()
CommerceNodeCheckoutBaseTest::setUp in ./commerce_node_checkout.test
Implementation of setUp().

File

./commerce_node_checkout.test, line 107
Provides tests for Commerce Node Checkout process.

Class

CommerceNodeCheckoutBaseTest
Base class for other test classes to extend.

Code

public function createAdmin($perms = array()) {
  $perms += array(
    'access administration pages',
    'administer checkout',
    'access checkout',
    'configure store',
    'administer commerce_customer_profile entities',
    'administer customer profile types',
    'administer line items',
    'administer line item types',
    'administer commerce_order entities',
    'configure order settings',
    'view any commerce_order entity',
    'create commerce_order entities',
    'edit any commerce_order entity',
    'administer commerce_product entities',
    'administer product types',
    'administer rules',
    'administer nodes',
    'bypass node access',
    'access content overview',
    'administer commerce node checkout',
    'view any commerce_order entity of bundle commerce_order',
    'administer users',
    'access user profiles',
  );
  return $this
    ->drupalCreateUser($perms);
}