You are here

protected function CartLinksTest::setCartLinksUiRedirect in Ubercart 8.4

Sets redirect destination page for invalid Cart Links.

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

Parameters

string $url: Relative URL of the destination page for the redirect. Omit leading '/'.

1 call to CartLinksTest::setCartLinksUiRedirect()
CartLinksTest::testCartLinksRestrictions in uc_cart_links/src/Tests/CartLinksTest.php
Tests Cart Links restrictions.

File

uc_cart_links/src/Tests/CartLinksTest.php, line 673

Class

CartLinksTest
Tests the Cart Links functionality.

Namespace

Drupal\uc_cart_links\Tests

Code

protected function setCartLinksUiRedirect($url = '') {
  $this
    ->drupalPostForm('admin/store/config/cart-links', [
    'uc_cart_links_invalid_page' => $url,
  ], 'Save configuration');
  $this
    ->assertFieldByName('uc_cart_links_invalid_page', $url, SafeMarkup::format('Cart Links invalid page URL contains ":url".', [
    ':url' => $url,
  ]));
}