11 use Magento\Mtf\Fixture\FixtureFactory;
12 use Magento\Mtf\TestCase\Injectable;
47 'valid_domestic_group' =>
'valid_vat_id_domestic',
48 'valid_intra_union_group' =>
'valid_vat_id_intra_union',
49 'invalid_group' =>
'invalid_vat_id',
50 'error_group' =>
'validation_error_vat_id' 70 foreach ($this->vatGroupDataSets as
$group => $dataset) {
72 $groupFixture = $this->fixtureFactory->createByCode(
'customerGroup', [
'dataset' => $dataset]);
73 $groupFixture->persist();
74 $this->vatGroups[
$group] = $groupFixture;
88 'customer/create_account/viv_domestic_group' => [
89 'value' => $this->vatGroups[
'valid_domestic_group']->getCustomerGroupId()
91 'customer/create_account/viv_intra_union_group' => [
92 'value' => $this->vatGroups[
'valid_intra_union_group']->getCustomerGroupId()
94 'customer/create_account/viv_invalid_group' => [
95 'value' => $this->vatGroups[
'invalid_group']->getCustomerGroupId()
97 'customer/create_account/viv_error_group' => [
98 'value' => $this->vatGroups[
'error_group']->getCustomerGroupId()
101 $vatConfig = $this->fixtureFactory->createByCode(
103 [
'data' => array_replace_recursive($vatConfig->getSection(), $groupConfig)]
105 $vatConfig->persist();
108 $this->customer->getData(),
109 [
'group_id' => [
'value' => $this->vatGroups[$customerGroup]->getCustomerGroupCode()]],
110 [
'address' => [
'addresses' => $this->customer->getDataFieldConfig(
'address')[
'source']->getAddresses()]]
112 $this->customer = $this->fixtureFactory->createByCode(
'customer', [
'data' =>
$customerData]);
122 $this->objectManager->create(
123 \
Magento\Config\Test\TestStep\SetupConfigurationStep::class,
124 [
'configData' => $this->configData,
'rollback' =>
true]
prepareVatConfig(ConfigData $vatConfig, $customerGroup)