Skip to content

Commit 0c760fe

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 4614006 commit 0c760fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ public function testSetCustomerFilter()
2626
$collection->setCustomerFilter($customer);
2727
$customer->setId(3);
2828
$collection->setCustomerFilter($customer);
29+
$this->assertStringMatchesFormat(
30+
'%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',
31+
(string)$select
32+
);
2933
$allowedCountriesObj = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
3034
\Magento\Directory\Model\AllowedCountries::class
3135
);
3236
$storeId = $customer->getStoreId();
3337
$allowedCountries = $allowedCountriesObj->getAllowedCountries(ScopeInterface::SCOPE_STORE, $storeId);
3438
$strAllowedCountries = implode("%S, %S", $allowedCountries);
35-
$format = '%AWHERE' .
36-
'%S(%Sparent_id%S IN(%S1%S, %S2%S))%SAND%S(%Scountry_id%S IN(%S' . $strAllowedCountries . '%S))' .
37-
'%SAND%S(%Sparent_id%S = %S-1%S)%SAND%S(%Scountry_id%S IN(%S' . $strAllowedCountries . '%S))' .
38-
'%SAND%S(%Sparent_id%S = %S3%S)%SAND%S(%Scountry_id%S IN(%S' . $strAllowedCountries . '%S))%A';
39-
$this->assertStringMatchesFormat($format, (string)$select);
39+
$this->assertStringMatchesFormat('%AWHERE%S(%Scountry_id%S IN(%S' . $strAllowedCountries . '%S))%A', (string)$select);
4040
}
4141
}

0 commit comments

Comments
 (0)