SilverCommerce\OrdersAdmin\Tests\LineItemTest
Synopsis
class LineItemTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'OrdersScaffold.yml';
- protected static array $extra_dataobjects = ;
- // methods
- public void setUp()
- public void tearDown()
- public void testGetTaxPercentage()
- public void testGetUnitPrice()
- public void testGetUnitTax()
- public void testGetUnitTotal()
- public void testGetSubTotal()
- public void testGetTaxTotal()
- public void testGetTotal()
- public void testCustomisationList()
- public void testCustomisationAndPriceList()
- public void testMatch()
- public void testCheckStockLevel()
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() — Add some extra functionality on construction
- tearDown() — Clean up after tear down
- testCheckStockLevel() — Test that a line item returns the correct amount of stock
- testCustomisationAndPriceList() — Test that a line item returns the correct customisation summary
- testCustomisationList() — Test that a line item returns the correct customisation summary
- testGetSubTotal() — Test that a line item tracks the total amount (without tax)
- testGetTaxPercentage() — Test that a line item recieves the correct tax rate
- testGetTaxTotal() — Test that a line item tracks the total amount of tax
- testGetTotal() — Test that a line item outputs the correct total
- testGetUnitPrice() — Test that a line item tracks a single unit price
- testGetUnitTax() — Test that a line item tracks tax for a single item
- testGetUnitTotal() — Test that a line item tracks the total amount for a single item
- testMatch() — Test that a line item matches a product correctly