You are here

function UCRestrictQtyFunctionalTest::drupalCreateProduct in Ubercart Restrict Qty 7

Same name and namespace in other branches
  1. 6.2 tests/uc_restrict_qty.test \UCRestrictQtyFunctionalTest::drupalCreateProduct()
3 calls to UCRestrictQtyFunctionalTest::drupalCreateProduct()
UCRestrictQtyFunctionalTest::testAdminProductSettings in tests/uc_restrict_qty.test
UCRestrictQtyFunctionalTest::testGlobalLimit in tests/uc_restrict_qty.test
UCRestrictQtyFunctionalTest::testProductLimit in tests/uc_restrict_qty.test

File

tests/uc_restrict_qty.test, line 30
UC Restrict Qty auto-tests.

Class

UCRestrictQtyFunctionalTest
@file UC Restrict Qty auto-tests.

Code

function drupalCreateProduct($price = 100) {

  // Create a product
  $node = array(
    'type' => 'product',
    'sell_price' => $price,
    'list_price' => '',
    'cost' => '',
    'model' => '',
    'weight' => '',
    'weight_units' => '',
    'length' => '',
    'width' => '',
    'height' => '',
    'length_units' => '',
    'default_qty' => '',
    'pkg_qty' => '',
    'shippable' => 0,
    'ordering' => '',
  );
  $product = $this
    ->drupalCreateNode($node);
  return $product;
}