protected function UCXFTestCase::createAddressField in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 uc_extra_fields_pane.test \UCXFTestCase::createAddressField()
Create a new address field
Parameters
int $type:
array $edit:
Return value
string The name of the field
2 calls to UCXFTestCase::createAddressField()
- UCXFCheckoutTestCase::testSanitizing in ./
uc_extra_fields_pane.test - Test if field values are properly sanitized.
- UCXFTestCase::setupFields in ./
uc_extra_fields_pane.test - Create default fields
File
- ./
uc_extra_fields_pane.test, line 130 - Automated tests for Extra Fields Pane
Class
- UCXFTestCase
- Base class for all Extra Fields Pane test cases.
Code
protected function createAddressField($type, $edit = array()) {
// Go the address fields page and click link.
$this
->drupalGet('admin/store/settings/countries/fields');
$this
->clickLink(t('Add an address field'));
$this
->assertTitle(t('Add an address field') . ' | Drupal', t('The page for adding an address field is displayed.'));
$edit += array(
'ucxf[panes][extra_delivery]' => 1,
'ucxf[panes][extra_billing]' => 1,
);
return $this
->createFieldHelper($type, $edit);
}