function UbercartTestHelper::createProductClass in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_store/tests/uc_store.test \UbercartTestHelper::createProductClass()
8 calls to UbercartTestHelper::createProductClass()
- UbercartAttributeTestCase::testAttributeAPI in uc_attribute/
uc_attribute.test - Tests the basic attribute API.
- UbercartAttributeTestCase::testAttributeUIAttributeOptionsBulkEdit in uc_attribute/
uc_attribute.test - Tests the "bulk edit attribute options" user interface.
- UbercartAttributeTestCase::testAttributeUIClassAttributeAdd in uc_attribute/
uc_attribute.test - Tests the "add product class attribute option" user interface.
- UbercartAttributeTestCase::testAttributeUIClassAttributeOptionOverview in uc_attribute/
uc_attribute.test - Tests the product class attribute option user interface.
- UbercartAttributeTestCase::testAttributeUIClassAttributeOverview in uc_attribute/
uc_attribute.test - Tests the product class attribute user interface.
File
- uc_store/
uc_store.test, line 89 - Test functionality provided by uc_store.
Class
- UbercartTestHelper
- Defines a base helper class for Ubercart tests.
Code
function createProductClass($data = array()) {
$product_class = $data + array(
'pcid' => $this
->randomName(8),
'name' => $this
->randomName(8),
'description' => $this
->randomName(8),
);
$product_class = (object) $product_class;
drupal_write_record('uc_product_classes', $product_class);
uc_product_node_info(TRUE);
node_types_rebuild();
return $product_class;
}