MageTest / BehatMage

Behat for Magento
MIT License
85 stars 31 forks source link

Missing ability to provide scope ID to config fixture service #17

Open Vinai opened 11 years ago

Vinai commented 11 years ago

The config fixture step provides the ability to specify a config scope (that is "default", "website" or "store"). For example:

When I set config value for "some/config/path" to "1" in "store" scope

The problem is, to be usable with anything but "default", a scope identifier needs to be specified, for example as follows:

When I set config value for "some/config/path" to "1" in "store" "usa" scope

In the table core_config_data the scope ID is stored as an integer ID, using 0 for the "default" scope. To make this more reusable the scope ID should be specifiable as a website or store view code.

References:

MageTest\MagentoExtension\Context\MagentoContext::iSetConfigValueForScope($path, $value, $scope)
MageTest\MagentoExtension\Service\ConfigManager::setCoreConfig($path, $value, $scope)
MageTest\MagentoExtension\Service\Config\CoreConfig::set($path, $value, $scope)