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

Class: ProductTest

Source Location: /tests/ProductTest.php

Class Overview

FunctionalTest
   |
   --ProductTest

Testing Product attributes and options on product pages.


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (c) 2011, Frank Mullenger

Variables

Methods



Class Details

[line 33]
Testing Product attributes and options on product pages.

Summary of tests: ----------------- delete product, is unpublished, versions still exist new version of product created when amount changed variations disabled when new attribute added correct options for variations returned on product page on first, second and third attribute dropdowns cannot save negative amount for product variation

TODO ---- add new variation add product to parent page, check URL works add product to multiple categories, check that it appears on each disable all variations, product should be unpublished try saving product with 'action_publish' passed as a Get var, when no enabled variations exist product should not be published

add product to cart, stock depletes latest version of product add variation to cart, stock depletes latest version of variation remove product from cart, stock replenishes latest version of product remote variation from cart, stock replenishes latest version of variation scheduled task deletes order and associated objects, replenishes stock




Tags:

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


[ Top ]


Class Variables

static $disable_themes =  true

[line 36]


Type:   mixed


[ Top ]

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

[line 35]


Type:   mixed


[ Top ]

static $use_draft_site =  true

[line 37]


Type:   mixed


[ Top ]



Class Methods


method getFormData [line 56]

Array getFormData( String $formID)

Helper to get data from a form.



Parameters:

String   $formID  

[ Top ]

method logOut [line 46]

void logOut( )

Log current member out by clearing session



[ Top ]

method setUp [line 39]

void setUp( )



[ Top ]

method testChangeProductAmount [line 111]

void testChangeProductAmount( )

Try to publish a product with amount changed



[ Top ]

method testDeleteProduct [line 80]

void testDeleteProduct( )

Try to delete a product, make sure it is unpublished but that versions remain the same



[ Top ]

method testNegativeVariationPrice [line 367]

void testNegativeVariationPrice( )

Try to save a Variation with a negative price difference



[ Top ]

method testProductOptionsFirstSet [line 200]

void testProductOptionsFirstSet( )

Load the project page and test the first select for correct product options

  • Teeshirt Variations
  • Small, Red, Cotton
  • Small, Red, Polyester
  • Small, Purple, Cotton
  • Small, Purple, Polyester
  • Medium, Purple, Cotton
  • Medium, Purple, Silk
  • Extra Large, Red, Cotton
  • Extra Large, Red, Polyester
  • Extra Large, Purple, Cotton




[ Top ]

method testProductOptionsSecondSet [line 259]

void testProductOptionsSecondSet( )

Post add to cart form and retreive second set of product options



[ Top ]

method testProductOptionsThirdSet [line 311]

void testProductOptionsThirdSet( )

Post add to cart form and retreive third set of product options



[ Top ]

method testVariationsDisabledAfterAttributeAdded [line 149]

void testVariationsDisabledAfterAttributeAdded( )

Try adding a new attribute to a product, existing variations that do not have an option set for

the new attribute should be disabled




[ Top ]


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