function UbercartCartLinksTestCase::setCartLinksUIAllowEmptying in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_cart_links/tests/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/
uc_cart_links.test - Tests cart links on a page under a variety of conditions.
File
- uc_cart_links/
uc_cart_links.test, line 611 - Ubercart Cart Links Tests.
Class
- UbercartCartLinksTestCase
- SimpleTests for Ubercart Cart Links.
Code
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',
)));
}