Skip to content

Commit 79c1823

Browse files
pradeep.rauthanpradeep.rauthan
authored andcommitted
MC-42623:Countries list is incorrect when using different countries per website and Global Customer Account settings - Integration test coverage implemented
1 parent 30b4b45 commit 79c1823

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/Address/StoreAddressCollectionTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ public function testSetCustomerFilter()
2626
$collection->setCustomerFilter($customer);
2727
$customer->setId(3);
2828
$collection->setCustomerFilter($customer);
29-
$allowedCountriesObj = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
30-
\Magento\Directory\Model\AllowedCountries::class
31-
);
3229
$format = '%AWHERE%S(%Sparent_id%S IN(%S1%S, %S2%S))%SAND%S(%Sparent_id%S = %S-1%S)%SAND%S(%Sparent_id%S = %S3%S)%A';
33-
$storeId = $customer->getStoreId() ?? null;
30+
31+
$storeId = $customer->getStoreId() ?? 1;
3432
if ($storeId) {
33+
$allowedCountriesObj = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
34+
\Magento\Directory\Model\AllowedCountries::class
35+
);
3536
$allowedCountries = $allowedCountriesObj->getAllowedCountries(ScopeInterface::SCOPE_STORE, $storeId);
3637
$strAllowedCountries = implode("%S, %S", $allowedCountries);
3738
$format = '%AWHERE%S(%Sparent_id%S IN(%S1%S, %S2%S))%SAND%S(%Sparent_id%S = %S-1%S)' .

0 commit comments

Comments
 (0)