feature #14921 [Fixtures] add possibility to configure shipping_address_in_checkout_required (BastienGoze)

This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12             |
| Bug fix?        | no                                                       |
| New feature?    | no                                                    |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |                     |
| License         | MIT                                                          |


Commits
-------

7dd12907e7 add possibility to configure shipping_address_in_checkout_required with fixtures
This commit is contained in:
Grzegorz Sadowski 2023-04-20 15:06:32 +02:00 committed by GitHub
commit 662e68a807
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -36,6 +36,7 @@ class ChannelFixture extends AbstractResourceFixture
->booleanNode('skipping_shipping_step_allowed')->end()
->booleanNode('skipping_payment_step_allowed')->end()
->booleanNode('account_verification_required')->end()
->booleanNode('shipping_address_in_checkout_required')->end()
->scalarNode('default_locale')->cannotBeEmpty()->end()
->variableNode('locales')
->beforeNormalization()

View file

@ -84,6 +84,7 @@ class ChannelExampleFactory extends AbstractExampleFactory implements ExampleFac
$channel->setSkippingShippingStepAllowed($options['skipping_shipping_step_allowed']);
$channel->setSkippingPaymentStepAllowed($options['skipping_payment_step_allowed']);
$channel->setAccountVerificationRequired($options['account_verification_required']);
$channel->setShippingAddressInCheckoutRequired($options['shipping_address_in_checkout_required']);
if (null !== $this->taxonRepository) {
$channel->setMenuTaxon($options['menu_taxon']);
@ -134,6 +135,8 @@ class ChannelExampleFactory extends AbstractExampleFactory implements ExampleFac
->setAllowedTypes('skipping_payment_step_allowed', 'bool')
->setDefault('account_verification_required', true)
->setAllowedTypes('account_verification_required', 'bool')
->setDefault('shipping_address_in_checkout_required', false)
->setAllowedTypes('shipping_address_in_checkout_required', 'bool')
->setDefault(
'default_tax_zone',
LazyOption::randomOneOrNull($this->zoneRepository, 100, ['scope' => [Scope::TAX, AddressingScope::ALL]]),