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