I set up unit tests for Magento 184.108.40.206 using EcomDev PHPUnit. I was able to make almost everything working properly. The only thing which I haven't figured out is how to use fixtures in multiple database setup.
There are two database resources set in
default_setupused by the whole codebase as default connection
my_extensionused by one custom extension, declared in module
Then I have following fixtures in
aliases: user: &user id: 1 login: john password: foo email: email@example.com customer_id: 1 firstname: John lastname: Doe customer_id: 1 tables: my_extension/user: - <<: *user id: 1 eav: customer: - <<: *eav_customer entity_id: 1 firstname: John lastname: Smith email: firstname.lastname@example.org
I would like to have
eav/customer fixture added using
default_setup resource and
my_extension/user fixture added using
As far as I see in
EcomDev_PHPUnit_Model_Fixture_Processor_Tables, it always uses default resource.
For now I just configured test Magento environment to have both resources using the same database.
Do you know any elegant way to make fixtures working with different resources?