function UbercartCartLinksTestCase::setCartLinksUIProductActionMessage in Ubercart 6.2
Same name and namespace in other branches
- 7.3 uc_cart_links/tests/uc_cart_links.test \UbercartCartLinksTestCase::setCartLinksUIProductActionMessage()
Sets checkbox to display cart links product action messages.
Must be logged in with 'administer cart links' permission.
Parameters
$state: TRUE to display product action messages, FALSE to not display. Defaults to FALSE.
1 call to UbercartCartLinksTestCase::setCartLinksUIProductActionMessage()
- UbercartCartLinksTestCase::testCartLinksProductActionMessage 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 567 - Ubercart Cart Links Tests.
Class
- UbercartCartLinksTestCase
- SimpleTests for Ubercart Cart Links.
Code
function setCartLinksUIProductActionMessage($state = FALSE) {
$this
->drupalPost('admin/store/settings/cart_links', array(
'uc_cart_links_add_show' => $state,
), t('Save configuration'));
$this
->assertFieldByName('uc_cart_links_add_show', $state, t('Display cart links product action messages is @state.', array(
'@state' => $state ? 'TRUE' : 'FALSE',
)));
}