SilverCommerce\ShoppingCart\Tests\ShoppingCartFactoryTest
Synopsis
class ShoppingCartFactoryTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'ShoppingCart.yml';
- protected static array $extra_dataobjects = ;
- // methods
- public void setUp()
- public null testConstruction()
- public null testAddItem()
- public null testUpdateItem()
- public null testRemoveItem()
- public null testDelete()
- public null testWrite()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Members
protected
- $extra_dataobjects
—
array
Setup test only objects - $fixture_file
—
string
Add some scaffold order records
Methods
public
- setUp()
- testAddItem() — Test adding an item to the shopping cart
- testConstruction() — Test setting up the cart using ShoppingCartFactory
- testDelete() — Test deleting the cart
- testRemoveItem() — Test removing an item
- testUpdateItem() — Test updating an item increases the quantity and that adding an existing item calls "update"
- testWrite() — Test saving a new cart