Reputation: 3887
I'm trying to understand PHPUNIT + MAGENTO and I found this extension https://github.com/EcomDev/EcomDev_PHPUnit which seems to be great tool.
I want have a fixture which set shipping method 'Freeshipping' per website. I found a solution for default configuration
config:
default/carriers/freeshipping/active: 1
default/carriers/freeshipping/free_shipping_subtotal: 150
default/carriers/freeshipping/name: Free
...
It works fine. But let's have a website ID = 2 then what do I need to add into fixture's yaml?
Upvotes: 1
Views: 937
Reputation: 13936
I think you would use:
config:
websites/{website_code}/carriers/freeshipping/active: 1
However, the config fixtures seem to have unwanted side effects like removing other config nodes.. So as inelegant as it is, I use:
public function setUp() {
Mage::app()->getStore(0)
->setConfig('carriers/freeshipping/active', 1);
// OR
Mage::getConfig()->setNode('websites/{$code}/carriers/freeshipping/active' 1);
}
Upvotes: 2