function UbercartCheckoutSettingsTestCase::testAnonymousCheckout in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_cart/tests/uc_cart.test \UbercartCheckoutSettingsTestCase::testAnonymousCheckout()
File
- uc_cart/
uc_cart.test, line 590 - Shopping cart and checkout tests.
Class
- UbercartCheckoutSettingsTestCase
- Tests the checkout settings page.
Code
function testAnonymousCheckout() {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/store/settings/checkout/edit');
$this
->assertField('uc_checkout_anonymous', t('Anonymous checkout field exists'));
$this
->drupalPost('admin/store/settings/checkout/edit', array(
'uc_checkout_anonymous' => FALSE,
), t('Save configuration'));
$this
->drupalLogout();
$this
->drupalPost('node/' . $this->product->nid, array(), t('Add to cart'));
$this
->drupalPost('cart', array(), 'Checkout');
$this
->assertNoText('Enter your billing address and information here.', t('The checkout page is not displayed.'));
}