Skip to content

Commit

Permalink
customer structure refactoring (#1700)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik authored Feb 28, 2020
2 parents 27fc4b3 + 91df3fd commit efd91f6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Shopsys\FrameworkBundle\Model\Customer\BillingAddress;
use Shopsys\FrameworkBundle\Model\Customer\BillingAddressData;
use Shopsys\FrameworkBundle\Model\Customer\Customer;
use Shopsys\FrameworkBundle\Model\Customer\CustomerData;
use Shopsys\FrameworkBundle\Model\Customer\DeliveryAddress;
use Shopsys\FrameworkBundle\Model\Customer\DeliveryAddressData;
use Shopsys\FrameworkBundle\Model\Order\Item\OrderItem;
Expand All @@ -35,10 +36,17 @@ class PersonalDataExportXmlTest extends TransactionFunctionalTestCase
public function testExportXml()
{
$country = $this->createCountry();
$customer = new Customer();
$customer->addBillingAddress($this->createBillingAddress($country, $customer));

$customerData = new CustomerData();
$customerData->domainId = Domain::FIRST_DOMAIN_ID;
$customer = new Customer($customerData);

$customerData->billingAddress = $this->createBillingAddress($country, $customer);
$deliveryAddress = $this->createDeliveryAddress($country);
$customer->addDeliveryAddress($deliveryAddress);
$customerData->deliveryAddresses[] = $deliveryAddress;

$customer->edit($customerData);

$customerUser = $this->createCustomerUser($customer);
$status = $this->createMock(OrderStatus::class);
$currencyData = new CurrencyData();
Expand Down

0 comments on commit efd91f6

Please sign in to comment.