[ class tree: swipestripe ] [ index: swipestripe ] [ all elements ]

Class: CartTest

Source Location: /tests/CartTest.php

Class Overview


Testing Products added and removed from Orders.



  • 1.0


  • Copyright (c) 2011, Frank Mullenger



Class Details

[line 37]
Testing Products added and removed from Orders.

Summary of tests: ----------------- add product to cart change quantity of product in cart update product and add it to cart again checking version number add negative quantity to cart add 0 quantity to cart try saving duplicate variations try saving variation without full set of options change product price after it is in the cart cannot add non-published product to the cart customer members can add stuff to carts website visitors can add stuff to carts add product to cart and change price add product variation change quantity of variation add different variations for same product add product and variation to cart and check version add variation to cart with price change check cart totals

TODO ---- remove options from product and variaiton when the attribute is deleted Test saving a product with a new attribute, existing variations without this attribute should be disabled


author:  Frank Mullenger <frankmullenger@gmail.com>
version:  1.0
copyright:  Copyright (c) 2011, Frank Mullenger

[ Top ]

Class Variables

static $disable_themes =  true

[line 40]

Type:   mixed

[ Top ]

static $fixture_file =  'swipestripe/tests/Shop.yml'

[line 39]

Type:   mixed

[ Top ]

static $use_draft_site =  false

[line 41]

Type:   mixed

[ Top ]

Class Methods

method getFormData [line 65]

Array getFormData( String $formID)

Helper to get data from a form.


String   $formID  

[ Top ]

method logOut [line 55]

void logOut( )

Log current member out by clearing session

[ Top ]

method setUp [line 43]

void setUp( )

[ Top ]

method testAddDisabledProductVariationToCart [line 441]

void testAddDisabledProductVariationToCart( )

Add disabled product variation to cart should not work

[ Top ]

method testAddInvalidProductVariationToCart [line 490]

void testAddInvalidProductVariationToCart( )

Add invalid product variation to cart should not work

[ Top ]

method testAddNonPublishedProductToCart [line 933]

void testAddNonPublishedProductToCart( )

Adding non published product to a cart should fail

[ Top ]

method testAddProductNegativeQuantityToCart [line 166]

void testAddProductNegativeQuantityToCart( )

Add negative quantity to cart, should have no effect on cart

[ Top ]

method testAddProductQuantityToCart [line 133]

void testAddProductQuantityToCart( )

Add product to the cart twice and check quantity

[ Top ]

method testAddProductToCart [line 99]

void testAddProductToCart( )

Add an item to the cart for a basic product and check correct product added

[ Top ]

method testAddProductToCartChangePrice [line 336]

void testAddProductToCartChangePrice( )

Change product price after it is in the cart, check that price has not changed in cart

[ Top ]

method testAddProductToCartLoggedInCustomer [line 307]

void testAddProductToCartLoggedInCustomer( )

Add a product logged in as a customer

[ Top ]

method testAddProductToCartLoggedOut [line 283]

void testAddProductToCartLoggedOut( )

Add a product to the cart as a visitor to the website

[ Top ]

method testAddProductVariationQuantity [line 545]

void testAddProductVariationQuantity( )

Add product variations and check quantities

[ Top ]

method testAddProductVariations [line 603]

void testAddProductVariations( )

Add different product variations for the same product

[ Top ]

method testAddProductVariationToCart [line 392]

void testAddProductVariationToCart( )

Add a product variation to the cart

[ Top ]

method testAddProductVersionToCart [line 233]

void testAddProductVersionToCart( )

Published products should get different versions, new versions are new items in the cart

[ Top ]

method testAddProductZeroQuantityToCart [line 200]

void testAddProductZeroQuantityToCart( )

Adding product with zero quantity should have no effect on cart

[ Top ]

method testAddVariationWithPriceChanged [line 742]

void testAddVariationWithPriceChanged( )

Add product variation with different price and check order total

[ Top ]

method testAddVariationWithVersion [line 666]

void testAddVariationWithVersion( )

Add product variations and check version correct

[ Top ]

method testCartTotals [line 860]

void testCartTotals( )

Add product and variation with quantity to cart and check total and subtotal

[ Top ]

method testProduct [line 89]

void testProduct( )

Create product and check basic attributes

[ Top ]

method testProductAttributeOptions [line 780]

void testProductAttributeOptions( )

Get product attribute and test options associated with it

[ Top ]

method testProductVariationOptions [line 802]

void testProductVariationOptions( )

Get variation options and test that they are correct

[ Top ]

method testSaveDuplicateProductVariation [line 832]

void testSaveDuplicateProductVariation( )

Test saving duplicate product variations

[ Top ]

method testSaveInvalidProductVariation [line 903]

void testSaveInvalidProductVariation( )

Test saving variation without all options set Disabled validation for product variations because preventing disabling a variation



[ Top ]

method testSetDraftTrue [line 926]

void testSetDraftTrue( )

Have to use draft site for following test testAddNonPublishedProductToCart

[ Top ]

Documentation generated on Thu, 08 Mar 2012 16:47:25 +1300 by phpDocumentor 1.4.4