Closed tim-bezhashvyly closed 1 year ago
This seems to be the minimum working example:
$customerFixture = new CustomerFixture(CustomerBuilder::aCustomer()->withAddresses(
AddressBuilder::anAddress()->asDefaultBilling(),
AddressBuilder::anAddress()->asDefaultShipping()
)->build());
$customerFixture->login();
$checkout = CustomerCheckout::fromCart(
CartBuilder::forCurrentSession()
->withProductRequest(ProductBuilder::aVirtualProduct()->build()->getSku())
->build()
);
$order = $checkout->placeOrder();
Hi Tim, nice to see you here :slightly_smiling_face: and thanks for the report! I classified this as documentation issue to fix the README at least, but IMHO default addresses should be added automatically if withAddresses()
is not used, so I'll see how to implement that
Should I open a PR?
@tim-bezhashvyly sure, I'd merge that :+1:
Can confirm that, lines with addresses have to be added
I'm trying to place an order using the example from https://github.com/tddwizard/magento2-fixtures#cartcheckout but getting following error:
Here is the reproducible code minimum:
The execution command is following: