You are here

function CommerceNoPaymentUpgrade::setUp in Commerce No Payment 7.2

Overrides parent::setUp().

Overrides DrupalWebTestCase::setUp

File

tests/CommerceNoPaymentUpgrade.test, line 27
Contains class CommerceNoPaymentUpgrade.

Class

CommerceNoPaymentUpgrade
Tests the upgrade path from Commerce no payment 7.x-1.x to 7.x-2.x.

Code

function setUp(array $modules = array()) {
  $this->profile = 'testing';
  parent::setUp($modules + array(
    'commerce_no_payment',
  ));
  $sets = round(COMMERCE_NO_PAYMENT_MIGRATE_PER_RUN / 2 + 1);
  while ($sets) {
    $this
      ->createTransaction(COMMERCE_PAYMENT_STATUS_PENDING);
    $this
      ->createTransaction(COMMERCE_PAYMENT_STATUS_FAILURE);
    $sets--;
  }
}