You are here

function UbercartCartLinksTestCase::setCartLinksUITrackClicks in Ubercart 6.2

Same name and namespace in other branches
  1. 7.3 uc_cart_links/tests/uc_cart_links.test \UbercartCartLinksTestCase::setCartLinksUITrackClicks()

Sets checkbox to track cart links clicks.

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

Parameters

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

File

uc_cart_links/uc_cart_links.test, line 589
Ubercart Cart Links Tests.

Class

UbercartCartLinksTestCase
SimpleTests for Ubercart Cart Links.

Code

function setCartLinksUITrackClicks($state = TRUE) {
  $this
    ->drupalPost('admin/store/settings/cart_links', array(
    'uc_cart_links_track' => 0,
  ), t('Save configuration'));
  $this
    ->assertFieldByName('uc_cart_links_track', $state ? 1 : 0, t('Track clicks is @state.', array(
    '@state' => $state ? 'TRUE' : 'FALSE',
  )));
}