\SWS_CheckoutTest
Testing {@link Order} modifiers at checkout.
Summary of tests:
-----------------
checkout published product
unpublish product after it is in the cart cannot checkout
delete product after it is in the cart cannot checkout
add variation then disable the variation, cannot checkout
add variation to cart then delete variation cannot checkout
submit checkout without products in cart
checkout with product that has attributes, without a variation set
submit checkout without necessary details
submit checkout without specifying payment gateway
TODO
----
process payment
send receipt
checkout addresses correct
when attribute deleted cannot checkout variation
when attribute deleted previous orders keep data
- Author: Frank Mullenger <frankmullenger@gmail.com>
- Copyright: Copyright (c) 2011, Frank Mullenger
Synopsis
class SWS_CheckoutTest
extends SWS_Test
{
- // Inherited members from SWS_Test
- protected static string $fixture_file;
- protected static boolean $disable_themes;
- protected static boolean $use_draft_site;
- // methods
- public void setUp()
- public void testCheckoutWithPublishedProduct()
- public void testCheckoutWithUnpublishedProduct()
- public void testCheckoutWithDeletedProduct()
- public void testCheckoutWithDisabledVariation()
- public void testCheckoutWithDeletedVariation()
- public void testCheckoutWithoutProducts()
- public void testCheckoutWithoutRequiredVariation()
- public void testCheckoutWithoutRequiredFields()
- public void testCheckoutWithoutPaymentGateway()
- // Inherited methods from SWS_Test
- public void setUp()
- public void logOut()
- public Array getFormData()
- public Array getFormDataNested()
- public Array searchNestedArray()
- public void testSWS()
Hierarchy
Extends
Members
protected
- $disable_themes
- $fixture_file
- $use_draft_site
Methods
public
- setUp()
- testCheckoutWithDeletedProduct() — Try to checkout a deleted product
- testCheckoutWithDeletedVariation() — Try to checkout a deleted variation
- testCheckoutWithDisabledVariation() — Try to checkout a disabled variation
- testCheckoutWithPublishedProduct() — Create product and check basic attributes
- testCheckoutWithUnpublishedProduct() — Try to checkout an unpublished product
- testCheckoutWithoutPaymentGateway() — Try checking out an order without specifying a payment gateway
- testCheckoutWithoutProducts() — Try to checkout without products added to the order
- testCheckoutWithoutRequiredFields() — Try to submit the checkout form without some required fields Assumes that billing FirstName is always required
- testCheckoutWithoutRequiredVariation() — Try to checkout with a product that requires a variation, without a variation in the cart
Inherited from SWS_Test
public
- getFormData() — Helper to get data from a form.
- getFormDataNested() — Helper to get data from a form in a nested array instead of just flat. Useful for post() calls.
- logOut() — Log current member out by clearing session
- searchNestedArray() — Search a nested array for key => value pair
- setUp()
- testSWS()