You are here

function DropdownAttributeTestCase::createProductClassProduct in Dropdown Attributes 6

Creates a new product in a product class.

1 call to DropdownAttributeTestCase::createProductClassProduct()
DropdownAttributeTestCase::testClassAttributeDependency in tests/uc_dropdown_attributes.test
Tests for dropdown attributes in product classes.

File

tests/uc_dropdown_attributes.test, line 283
Dropdown Attribute Tests

Class

DropdownAttributeTestCase
Tests for Dropdown Attributes.

Code

function createProductClassProduct($class) {
  $edit = array(
    'title' => $this
      ->randomName(8),
    'model' => $this
      ->randomName(8),
    'sell_price' => mt_rand(1, 9999),
    'pkg_qty' => 1,
  );
  $this
    ->drupalPost('node/add/' . $class, $edit, t('Save'));
}