You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2023. It is now read-only.
We're setting up a site with a reasonably complex multi-store structure. We've got a setup script that deletes the standard base website and store view, before creating our own. As a result, there's no website_id/store_id 1 in our database. The fixture loader fails with the following error when loading app/code/community/EcomDev/PHPUnitTest/Test/Helper/_data/fx-customers.yaml:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mysite_test.customer_entity, CONSTRAINT FK_CUSTOMER_ENTITY_STORE_ID_CORE_STORE_STORE_ID FOREIGN KEY (store_id) REFERENCES core_store (store_id) ON DELETE SET NULL ON UPDATE CASCADE)' in /var/www/vhosts/mysite/lib/Zend/Db/Statement/Pdo.php:228
We find that putting all of the required data into fixtures (e.g. default scope, root categories) even if that data would normally be created by core setup scripts leads to more isolated tests.
The text was updated successfully, but these errors were encountered:
EcomDev_PHPUnitTest module is intended to test only EcomDev_PHPUnit functionality on bare Magento install, and it actually disables this module by default, when you installing EcomDev_PHPUnit extension. So you should disable it, if you enabled it occasionally.
We're setting up a site with a reasonably complex multi-store structure. We've got a setup script that deletes the standard base website and store view, before creating our own. As a result, there's no website_id/store_id 1 in our database. The fixture loader fails with the following error when loading app/code/community/EcomDev/PHPUnitTest/Test/Helper/_data/fx-customers.yaml:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
mysite_test.
customer_entity, CONSTRAINT
FK_CUSTOMER_ENTITY_STORE_ID_CORE_STORE_STORE_IDFOREIGN KEY (
store_id) REFERENCES
core_store(
store_id) ON DELETE SET NULL ON UPDATE CASCADE)' in /var/www/vhosts/mysite/lib/Zend/Db/Statement/Pdo.php:228
We find that putting all of the required data into fixtures (e.g. default scope, root categories) even if that data would normally be created by core setup scripts leads to more isolated tests.
The text was updated successfully, but these errors were encountered: