\DMSDocumentCartControllerTest
Class DMSDocumentCartControllerTest contains all the tests for {@link DMSDocumentCartController}
Synopsis
class DMSDocumentCartControllerTest
extends FunctionalTest
{
- // members
- protected static string $fixture_file = 'dms-cart/tests/DMSDocumentCartTest.yml';
- protected DMSDocumentCartController $controller;
- protected DMSDocumentCart $cart;
- // methods
- public void setUp()
- public void testItems()
- public void testReceiverInfo()
- public void testIsCartEmpty()
- public void testAdd()
- public void testDeduct()
- public void testRemove()
- public void testCannotAddMoreThanSuggestedQuantityOfItem()
- public void testMultipleValidationErrorsReturned()
- public void testValidationErrorReturnedOnInvalidAdd()
- public void testUpdateCartItems()
- public array updateCartItemsProvider()
- public void testDMSCartEditForm()
- public void testDMSCartEditFormIsExtensible()
- public void testView()
- public void testLink()
- public void testEmptyCartShowsNoticeOnCheckout()
Hierarchy
Extends
- FunctionalTest
Members
protected
- $cart — DMSDocumentCart
- $controller — DMSDocumentCartController
- $fixture_file
Methods
public
- setUp()
- testAdd()
- testCannotAddMoreThanSuggestedQuantityOfItem() — Ensure that a validation error is shown when requesting to add more of a document that is allowed
- testDMSCartEditForm() — Tests DMSCartEditForm form has a FieldList
- testDMSCartEditFormIsExtensible() — Tests if the DMSCartEditForm is extensible
- testDeduct()
- testEmptyCartShowsNoticeOnCheckout() — Ensure that the user is notified when the cart is empty
- testIsCartEmpty()
- testItems() — Test the items method of the controller
- testLink() — Ensure the link is "friendly", not a class name
- testMultipleValidationErrorsReturned() — Ensure that multiple validation errors are returned in the failure message, if any
- testReceiverInfo()
- testRemove()
- testUpdateCartItems() — Tests whether the cart items are updated from the controller
- testValidationErrorReturnedOnInvalidAdd() — Ensure that when a document that cannot be added to the cart is added to the cart, a validation error is returned
- testView() — Tests that the cart summary view is returned.
- updateCartItemsProvider()