public static function UbercartAttributeTestCase::createProductAdjustment in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_attribute/uc_attribute.test \UbercartAttributeTestCase::createProductAdjustment()
Creates a product adjustment SKU.
Parameters
$data:
3 calls to UbercartAttributeTestCase::createProductAdjustment()
- UbercartAttributeTestCase::testAttributeAPI in uc_attribute/
tests/ uc_attribute.test - Tests the basic attribute API.
- UbercartAttributeTestCase::testAttributeUIProductAdjustments in uc_attribute/
tests/ uc_attribute.test - Tests the "product adjustments" page.
- UbercartAttributeTestCase::testProductAttribute in uc_attribute/
tests/ uc_attribute.test - Tests attributes applied to a product.
File
- uc_attribute/
tests/ uc_attribute.test, line 775 - 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_insert('uc_product_adjustments')
->fields($adjustment)
->execute();
return (object) $adjustment;
}