You are here

protected function CommerceBaseTestCase::getCommerceUrl in Commerce Core 7

Return one of the Commerce configured urls.

20 calls to CommerceBaseTestCase::getCommerceUrl()
CommerceBaseTestCase::assertProductAddedToCart in tests/commerce_base.test
Asserts that a product has been added to the cart.
CommerceCartTestCaseAnonymousToAuthenticated::testCommerceCartAnonymousToAuthenticated in modules/cart/tests/commerce_cart.test
Test anonymous cart conversion.
CommerceCartTestCaseAttributes::testCommerceCartSelectProductAdd in modules/cart/tests/commerce_cart.test
Test the add to cart functional process with attributes.
CommerceCartTestCaseMultiProducts::testCommerceCartFormStructure in modules/cart/tests/commerce_cart.test
Test if the cart form has the correct fields and structure.
CommerceCartTestCaseMultiProducts::testCommerceCartSelectProductAdd in modules/cart/tests/commerce_cart.test
Test to select one product and check if it has been correctly added to the cart.

... See full list

File

tests/commerce_base.test, line 219
Defines abstract base test class for the Commerce module tests.

Class

CommerceBaseTestCase
Abstract class for Commerce testing. All Commerce tests should extend this class.

Code

protected function getCommerceUrl($element = 'cart') {
  $links = commerce_line_item_summary_links();
  if ($element == 'cart') {
    return $links['view_cart']['href'];
  }
  if ($element == 'checkout') {
    return $links['checkout']['href'];
  }
}