Question

My purpose is to check whether certain values are properly set after I place an Order. As I am using a complete separate databse for unit testing purpose I don't have the Magento configuration available in the database.

I am trying to enable payment method and shipping method by inserting data through fixture in core_config_data table, by the following way

config:
    default/dev/template/allow_symlink: 1
    default/payment/purchaseorder/active: 1
    default/carriers/matrixrate/active: 1

But after running the test, when I check the test database table, I can't see those values in there. According to EcomDev_PHPUnit manual we can insert config data in that way. What am I missing here? Is there something else I should consider?

Was it helpful?

Solution

What am I missing here?

You did everything right, but you are looking in the wrong place. The original configuration is restored after the test (see EcomDev_PHPUnit_Model_Fixture_Processor_Config). So you only see the values in the database during the test, not afterwards.

Or better, verify in the test:

$this->assertEquals('1', Mage::getStoreConfig('payment/purchaseorder/active'));
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top