LaravelShoppingcart
LaravelShoppingcart copied to clipboard
Create test for erase()
The Cart::erase()
method has no unit test affecting coverage and production security. The Cart::erase()
method should have a unit test verifying its functionality.
To verify:
- Create Cart with known instance id
- Add item to Cart
- Store Cart
- Erase Cart
- Restore Cart
- Verify that Cart is empty.
- (Optional) Verify that database is empty