Allow for easily sending multiple order items

This allows for the sending of multiple items in a single order, by
adding a new `OrderItem` class and moving all of the order item specific
fields from the `Order` to an individual item.

These can then be assigned to an order using the `withOrderItems()`
method as an array of order items.

Fixes #19
This commit is contained in:
Oliver Davies 2020-06-08 19:33:49 +01:00
parent 0ed99797f5
commit ae766763b2
9 changed files with 86 additions and 53 deletions

View file

@ -60,8 +60,6 @@ class TestCase extends \PHPUnit\Framework\TestCase
$order->method('getCurrencyCode')->willReturn('GBP');
$order->method('getCustomer')->willReturn($this->getMockCustomer());
$order->method('getOrderNumber')->willReturn('abc123');
$order->method('getPrice')->willReturn(7.99);
$order->method('getSku')->willReturn('this-is-the-first-sku');
return $order;
}