protected static function UbercartAttributeTestCase::attributeOptionFieldsToTest in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_attribute/uc_attribute.test \UbercartAttributeTestCase::attributeOptionFieldsToTest()
Returns array of available fields for product or class attribute options.
Parameters
$type:
1 call to UbercartAttributeTestCase::attributeOptionFieldsToTest()
- UbercartAttributeTestCase::testAttributeAPI in uc_attribute/
tests/ uc_attribute.test - Tests the basic attribute API.
File
- uc_attribute/
tests/ uc_attribute.test, line 810 - Ubercart Attribute Tests.
Class
- UbercartAttributeTestCase
- SimpleTests for the Ubercart Attributes API.
Code
protected static function attributeOptionFieldsToTest($type = '') {
$fields = array(
'aid',
'oid',
'name',
'cost',
'price',
'weight',
'ordering',
);
switch ($type) {
case 'product':
case 'class':
$info = uc_attribute_type_info($type);
$fields = array_merge($fields, array(
$info['id'],
));
break;
}
return $fields;
}