You are here

protected function UbercartCartLinksTestCase::setCartLinksUIProductActionMessage in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_cart_links/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/tests/uc_cart_links.test
Tests Cart Links product action messages.

File

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

Class

UbercartCartLinksTestCase
SimpleTests for Ubercart Cart Links.

Code

protected 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',
  )));
}