You are here

protected function UbercartCartLinksTestCase::setCartLinksUITrackClicks in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_cart_links/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/tests/uc_cart_links.test, line 563
Ubercart Cart Links Tests.

Class

UbercartCartLinksTestCase
SimpleTests for Ubercart Cart Links.

Code

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