protected function UbercartCartLinksTestCase::setCartLinksUIRestrictions in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_cart_links/uc_cart_links.test \UbercartCartLinksTestCase::setCartLinksUIRestrictions()
Sets allowed Cart Links.
Must be logged in with 'administer cart links' permission.
Parameters
$restrictions: String containing user input from a textarea, one restriction per line. Restrictions are valid Cart Links - i.e. relative URLs.
1 call to UbercartCartLinksTestCase::setCartLinksUIRestrictions()
- UbercartCartLinksTestCase::testCartLinksRestrictions in uc_cart_links/
tests/ uc_cart_links.test - Tests Cart Links restrictions.
File
- uc_cart_links/
tests/ uc_cart_links.test, line 630 - Ubercart Cart Links Tests.
Class
- UbercartCartLinksTestCase
- SimpleTests for Ubercart Cart Links.
Code
protected function setCartLinksUIRestrictions($restrictions = '') {
$this
->drupalPost('admin/store/settings/cart-links', array(
'uc_cart_links_restrictions' => $restrictions,
), t('Save configuration'));
$this
->assertFieldByName('uc_cart_links_restrictions', $restrictions, t('Cart Links restrictions contains "@restrictions".', array(
'@restrictions' => $restrictions,
)));
}