EcomDev/EcomDev_PHPUnit — pull request #146 by colinmollenhour (2013-09-27 18:47:15+00:00)
Title: Fixes for foreign key checks, arbitrary tables and disabled indexers

There are three problems I ran into with some fixtures which are addressed by this pull request:

1. If the fixtures have rows for tables with foreign key constraints like ON DELETE RESTRICT then cleaning and applying the fixtures fails since the parent table is deleted before the child table. The first commit in the pull request fixes this by deleting the table data in reverse order.

2. Some tables in Magento don't have "entities" defined in the config. When you try to use one of these in a fixture (e.g. "catalog_product_entity_varchar") you get the error:

Can't retrieve entity config: ecomdev_phpunit/catalog_product_entity_varchar

Setting the _resourceModel property causes this to be resolved to the correct table without an error.

3. When disabling some core modules (a.la. Mage_Lite) there are errors since certain indexers are assumed to be present. This just checks that they exist to avoid fatal errors.