function PaymentCommerceCheckoutWebTestCase::setUp in Payment for Drupal Commerce 7.2
Same name and namespace in other branches
- 7 tests/PaymentCommerceCheckoutWebTestCase.test \PaymentCommerceCheckoutWebTestCase::setUp()
Overrides parent::setUp().
Overrides DrupalWebTestCase::setUp
File
- tests/
PaymentCommerceCheckoutWebTestCase.test, line 20
Class
Code
function setUp(array $modules = array()) {
$this->profile = 'testing';
$modules = array_merge($modules, array(
'payment_commerce',
'paymentmethodbasic',
), parent::setUpHelper('api'), parent::setUpHelper('ui'));
parent::setUp($modules);
$this->payment_method_unavailable = PaymentWebTestCase::paymentMethodCreate(0, payment_method_controller_load('PaymentMethodControllerUnavailable'));
entity_save('payment_method', $this->payment_method_unavailable);
// Payment field configuration.
$this->field_paymentform = field_create_field(array(
'field_name' => 'field_foo',
'type' => 'text',
));
$this->field_paymentform_instance = field_create_instance(array(
'field_name' => 'field_foo',
'entity_type' => 'payment',
'bundle' => 'payment',
'required' => TRUE,
'widget' => array(
'type' => 'text_textfield',
),
));
// Set up the store.
$this->product = $this
->createDummyProduct('foo', 'bar', 1234);
}