Open
Description
Preconditions
- Magento 2.3.4 (incl. Vertex) w/ MFTF 2.5.3 (cursory glance suggests issue occurs with
develop
branch)
Steps to reproduce
- Modify test VertexAsRegisteredCustomerCheckTaxWhenFlexibleFieldIsSentForEcoProducts to not after step
setupFlexFieldConfig
- Modify before step
setupFlexFieldConfig
in same test to be:
<magentoCLI stepKey="setupFlexFieldConfig" command="config:set" arguments='tax/vertex_flexfields/code '[{"field_id":"1","field_source":"product.custom.$$createProductAttribute.attribute_code$$"}]'' />
- Check
core_config_data
table for path 'tax/vertex_flexfields/code'
Expected result
- Value is
[{"field_id":"1","field_source":"product.custom.[CODE]"}]
Actual result
- Value is
\[\{\"field_id\":\"1\",\"field_source\":\"product.custom.[CODE]\"\}\]
This is caused by PHP's escapeshellcmd
method call: https://github.com/magento/magento2-functional-testing-framework/blob/develop/etc/config/command.php#L26
magento2-functional-testing-framework/etc/config/command.php
Lines 25 to 27 in d82e6cf
If the '
is not included, the result instead has the brackets not escaped (properly) but removes the quotation marks entirely. I have failed to find any combination of escaping that comes out of escapeshellcmd
in a way that sets this configuration value correctly.
By itself, it is handled properly by escapeshellarg
but I am not aware of any reliable way to automatically determine individual arguments in $arguments