You are here

protected function UbercartCartLinksTestCase::setCartLinksUIAllowEmptying in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_cart_links/uc_cart_links.test \UbercartCartLinksTestCase::setCartLinksUIAllowEmptying()

Sets checkbox to allow Cart Links to empty cart.

Must be logged in with 'administer cart links' permission.

Parameters

$state: TRUE to display product action messages, FALSE to not display. Defaults to TRUE.

1 call to UbercartCartLinksTestCase::setCartLinksUIAllowEmptying()
UbercartCartLinksTestCase::testCartLinksAllowEmptying in uc_cart_links/tests/uc_cart_links.test
Tests Cart Links cart empty action.

File

uc_cart_links/tests/uc_cart_links.test, line 585
Ubercart Cart Links Tests.

Class

UbercartCartLinksTestCase
SimpleTests for Ubercart Cart Links.

Code

protected function setCartLinksUIAllowEmptying($state = TRUE) {
  $this
    ->drupalPost('admin/store/settings/cart-links', array(
    'uc_cart_links_empty' => $state,
  ), t('Save configuration'));
  $this
    ->assertFieldByName('uc_cart_links_empty', $state, t('Allow Cart Links to empty carts is @state.', array(
    '@state' => $state ? 'TRUE' : 'FALSE',
  )));
}