You are here

protected function UCDropdownAttributesTestCase::createProductClassProduct in Dropdown Attributes 7

Creates a new product in a product class.

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

File

tests/uc_dropdown_attributes.test, line 294
Tests for Dropdown Attributes.

Class

UCDropdownAttributesTestCase
Provides tests for Dropdown Attributes.

Code

protected 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'));
}