public function UbercartCheckoutSettingsTestCase::testAnonymousCheckout in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_cart/uc_cart.test \UbercartCheckoutSettingsTestCase::testAnonymousCheckout()
Tests anonymous checkout functionality.
File
- uc_cart/
tests/ uc_cart.test, line 886 - Shopping cart and checkout tests.
Class
- UbercartCheckoutSettingsTestCase
- Tests the checkout settings page.
Code
public function testAnonymousCheckout() {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/store/settings/checkout');
$this
->assertField('uc_checkout_anonymous', t('Anonymous checkout field exists'));
$this
->drupalPost('admin/store/settings/checkout', 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.'));
}