protected function CommercePricelistTestCase::setUp in Commerce Pricelist 7
Helper function to perform the common test tasks for price list testing.
Overrides DrupalWebTestCase::setUp
See also
CommerceBaseTestCase::setUpHelper()
3 calls to CommercePricelistTestCase::setUp()
- CommercePricelistFeedsTestCaseSimpleProduct::setUp in commerce_pricelist_feeds/
tests/ commerce_pricelist_feeds.test - Implementation of setUp().
- CommercePricelistRoleTestCaseSimpleProduct::setUp in commerce_pricelist_role/
tests/ commerce_pricelist_role.test - Implementation of setUp().
- CommercePricelistTaxTest::setUp in tests/
commerce_pricelist_tax.test - Implementation of setUp().
3 methods override CommercePricelistTestCase::setUp()
- CommercePricelistFeedsTestCaseSimpleProduct::setUp in commerce_pricelist_feeds/
tests/ commerce_pricelist_feeds.test - Implementation of setUp().
- CommercePricelistRoleTestCaseSimpleProduct::setUp in commerce_pricelist_role/
tests/ commerce_pricelist_role.test - Implementation of setUp().
- CommercePricelistTaxTest::setUp in tests/
commerce_pricelist_tax.test - Implementation of setUp().
File
- tests/
commerce_pricelist.test, line 49 - Functional tests for the commerce price list module.
Class
- CommercePricelistTestCase
- Abstract class for Commerce price list testing. All Commerce price list tests should extend this class.
Code
protected function setUp($other_modules = array()) {
$other_modules[] = 'commerce_pricelist';
$modules = parent::setUpHelper('ui', $other_modules);
parent::setUp($modules);
// Create a dummy product display content type.
$this
->createDummyProductDisplayContentType();
// Create dummy product display nodes (and their corresponding product
// entities).
$this->pricelist_a = $this
->createDummyPricelist('A', 0);
$this->pricelist_b = $this
->createDummyPricelist('B', 1);
$this->product = $this
->createDummyProduct('', '', 0);
$this->product_node = $this
->createDummyProductNode(array(
$this->product->product_id,
));
$this->store_admin = $this
->createStoreAdmin();
$this->store_customer = $this
->createStoreCustomer();
$this->site_admin = $this
->createAdminUser();
}