public static function UbercartAttributeTestCase::createProductAdjustment in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_attribute/tests/uc_attribute.test \UbercartAttributeTestCase::createProductAdjustment()
Creates a product adjustment SKU.
Parameters
$data:
1 call to UbercartAttributeTestCase::createProductAdjustment()
- UbercartAttributeTestCase::testAttributeAPI in uc_attribute/
uc_attribute.test - Tests the basic attribute API.
File
- uc_attribute/
uc_attribute.test, line 773 - Ubercart Attribute Tests
Class
- UbercartAttributeTestCase
- SimpleTests for the Ubercart Attributes API.
Code
public static function createProductAdjustment($data) {
$adjustment = $data + array(
'model' => self::randomName(8),
);
db_query("INSERT INTO {uc_product_adjustments} (nid, combination, model) VALUES (%d, '%s', '%s')", $adjustment['nid'], $adjustment['combination'], $adjustment['model']);
}