Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

Fixes for foreign key checks, arbitrary tables and disabled indexers #146

Merged
merged 4 commits into from
Sep 27, 2013

Conversation

colinmollenhour
Copy link
Contributor

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.

  1. 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.

IvanChepurnyi added a commit that referenced this pull request Sep 27, 2013
Fixes for foreign key checks, arbitrary tables and disabled indexers
@IvanChepurnyi IvanChepurnyi merged commit 5ab8930 into EcomDev:dev Sep 27, 2013
@IvanChepurnyi
Copy link
Member

Looks good. Tonight working on reorganisation of fixtures.

@colinmollenhour colinmollenhour deleted the fixes branch September 27, 2013 22:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants