function UbercartCartLinksTestCase::testCartLinksRedirect in Ubercart 6.2
Tests page redirection for invalid cart links.
File
- uc_cart_links/
uc_cart_links.test, line 397 - Ubercart Cart Links Tests.
Class
- UbercartCartLinksTestCase
- SimpleTests for Ubercart Cart Links.
Code
function testCartLinksRedirect() {
// set redirect link
// assert redirection for invalid link
// assert redirection for restricted link
// assert non-redirect for valid link
// Create product
$products[] = $this
->createCartLinksProduct(FALSE);
// Create a product class
$products[] = $this
->createCartLinksProduct(FALSE);
// later ...
// Create some valid cart links for these products
$link_array = $this
->createValidCartLinks($products);
$cart_links = $link_array['links'];
$link_data = $link_array['data'];
// Create a page containing these links
$page = $this
->createCartLinksPage($cart_links);
$this
->drupalLogin($this->adminUser);
$this
->drupalLogout();
}