You are here

protected function UCXFTestCase::createCustomOrderField in Extra Fields Checkout Pane 6.2

Create a new custom order field

Parameters

int $type:

array $edit:

Return value

string The name of the field

1 call to UCXFTestCase::createCustomOrderField()
UCXFTestCase::setupFields in ./uc_extra_fields_pane.test
Create default fields

File

./uc_extra_fields_pane.test, line 141
Automated tests for Extra Fields Pane

Class

UCXFTestCase
Base class for all Extra Fields Pane test cases.

Code

protected function createCustomOrderField($type, $edit = array()) {

  // Go the custom order fields page and click link.
  $this
    ->drupalGet('admin/store/settings/checkout/edit/extrafields');
  $this
    ->clickLink(t('Add a custom order field'));
  $this
    ->assertTitle(t('Add custom order field') . ' | Drupal', t('The page for adding a custom order field is displayed.'));
  $edit += array(
    'ucxf[weight]' => 0,
    'ucxf[pane_type]' => 'extra_information',
  );
  return $this
    ->createFieldHelper($type, $edit);
}