From 0faacffe32e7d3e65570c1a81adb98ffa83938a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Ludvik?= Date: Tue, 25 Feb 2020 13:53:19 +0100 Subject: [PATCH 1/2] customers are now managed via CustomerFacade --- .../PersonalData/PersonalDataExportXmlTest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php b/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php index 5763203194..a8d18bd276 100644 --- a/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php +++ b/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php @@ -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; @@ -35,10 +36,16 @@ class PersonalDataExportXmlTest extends TransactionFunctionalTestCase public function testExportXml() { $country = $this->createCountry(); - $customer = new Customer(); - $customer->addBillingAddress($this->createBillingAddress($country, $customer)); + + $customerData = new CustomerData(); + $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(); From 91df3fd922edd7fb5e3127df0da86fa3ee0af2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Ludvik?= Date: Tue, 25 Feb 2020 13:55:08 +0100 Subject: [PATCH 2/2] Customer is now assigned to domain --- tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php b/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php index a8d18bd276..2660618321 100644 --- a/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php +++ b/tests/App/Functional/PersonalData/PersonalDataExportXmlTest.php @@ -38,6 +38,7 @@ public function testExportXml() $country = $this->createCountry(); $customerData = new CustomerData(); + $customerData->domainId = Domain::FIRST_DOMAIN_ID; $customer = new Customer($customerData); $customerData->billingAddress = $this->createBillingAddress($country, $customer);