You are here

public function UcAddressesTestCase::setUp in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 tests/UcAddressesTestCase.test \UcAddressesTestCase::setUp()

Install users and modules needed for all tests.

Return value

void

Overrides DrupalWebTestCase::setUp

3 calls to UcAddressesTestCase::setUp()
UcAddressesEntityCase::setUp in tests/uc_addresses.entity.test
Setup.
UcAddressesFeedsTest::setUp in tests/uc_addresses.feeds.test
Setup.
UcAddressesViewsTestCase::setUp in tests/uc_addresses.views.test
Setup.
3 methods override UcAddressesTestCase::setUp()
UcAddressesEntityCase::setUp in tests/uc_addresses.entity.test
Setup.
UcAddressesFeedsTest::setUp in tests/uc_addresses.feeds.test
Setup.
UcAddressesViewsTestCase::setUp in tests/uc_addresses.views.test
Setup.

File

tests/UcAddressesTestCase.test, line 42
Contains base class for Ubercart Addresses tests.

Class

UcAddressesTestCase
Base class for Ubercart Addresses tests.

Code

public function setUp() {

  // Setup modules.
  parent::setUp('ctools', 'token', 'uc_store', 'uc_addresses');

  // Setup users
  $this->basicUser = $this
    ->drupalCreateUser();
  $this->customer = $this
    ->drupalCreateUser(array(
    'add/edit own addresses',
    'delete own addresses',
  ));
  $this->adminUser = $this
    ->drupalCreateUser(array(
    'add/edit all addresses',
    'delete all addresses',
  ));

  // Revoke default permissions for authenticated user, so we can test the effect of permissions.
  user_role_revoke_permissions(DRUPAL_AUTHENTICATED_RID, array(
    'view own addresses',
    'add/edit own addresses',
    'delete own addresses',
  ));
}