public function CommerceBaseTesterTestCase::testModulesEnabled in Commerce Core 7
Ensure that all of the Commerce modules (and their dependencies) are enabled in the test environment.
File
- tests/
commerce_base.test, line 764 - Defines abstract base test class for the Commerce module tests.
Class
- CommerceBaseTesterTestCase
- Test class to test the CommerceBaseTestCase functions. All testTestFoo functions have "testTest" in the name to indicate that they are verifying that a test is working. Somewhat "meta" to do this, but it eases test development.
Code
public function testModulesEnabled() {
$this
->drupalLogin($this->site_admin);
$this
->drupalGet('admin/modules');
$module_ids = array(
'edit-modules-commerce-commerce-cart-enable',
'edit-modules-commerce-commerce-checkout-enable',
'edit-modules-commerce-commerce-enable',
'edit-modules-commerce-commerce-customer-enable',
'edit-modules-commerce-commerce-line-item-enable',
'edit-modules-commerce-commerce-order-enable',
'edit-modules-commerce-commerce-payment-enable',
'edit-modules-commerce-commerce-price-enable',
'edit-modules-commerce-commerce-product-enable',
'edit-modules-commerce-commerce-product-reference-enable',
'edit-modules-commerce-commerce-product-pricing-enable',
'edit-modules-commerce-commerce-tax-enable',
'edit-modules-commerce-commerce-payment-example-enable',
'edit-modules-commerce-commerce-ui-enable',
'edit-modules-commerce-commerce-customer-ui-enable',
'edit-modules-commerce-commerce-line-item-ui-enable',
'edit-modules-commerce-commerce-order-ui-enable',
'edit-modules-commerce-commerce-payment-ui-enable',
'edit-modules-commerce-commerce-product-pricing-ui-enable',
'edit-modules-commerce-commerce-product-ui-enable',
'edit-modules-commerce-commerce-tax-ui-enable',
'edit-modules-fields-addressfield-enable',
'edit-modules-other-entity-enable',
'edit-modules-rules-rules-enable',
'edit-modules-chaos-tool-suite-ctools-enable',
'edit-modules-views-views-enable',
);
foreach ($module_ids as $module_id) {
$this
->assertFieldChecked($module_id);
}
}