public function CommerceBaseTesterTestCase::testTestCreateDummyTaxType in Commerce Core 7
Test creating a new tax type.
File
- tests/
commerce_base.test, line 985 - 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 testTestCreateDummyTaxType() {
// Create a dummy tax type.
$tax_type = $this
->createDummyTaxType();
// Create and login with a store admin user.
$store_admin = $this
->createStoreAdmin();
$this
->drupalLogin($store_admin);
// Access to the tax type listing page and assert that the dummy tax type
// is present.
$this
->drupalGet('admin/commerce/config/taxes/types');
$this
->assertText($tax_type['display_title'], t('Dummy tax type found on admin page at admin/commerce/config/taxes/types'));
}